diff --git a/ansible.cfg b/ansible.cfg index 31c9de2..0a7d5ca 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,5 @@ [defaults] -inventory = ./hosts +inventory = ./inventory [privilege_escalation] become_ask_pass=True \ No newline at end of file diff --git a/hosts b/hosts deleted file mode 100644 index 174557a..0000000 --- a/hosts +++ /dev/null @@ -1,10 +0,0 @@ -[prusa] -prusa.lan ansible_user=ubuntu - -[iron_man] -iron-man.lan - -[docker_swarm] -node-01.lan docker_node=node-01 -node-02.lan docker_node=node-02 -node-03.lan docker_node=node-03 \ No newline at end of file diff --git a/hosts.yml b/hosts.yml deleted file mode 100644 index 73af51d..0000000 --- a/hosts.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -all: - hosts: - prusa: - ansible_host: prusa.lan - ansible_user: ubuntu \ No newline at end of file diff --git a/inventory/hosts.yml b/inventory/hosts.yml new file mode 100644 index 0000000..e9d77ee --- /dev/null +++ b/inventory/hosts.yml @@ -0,0 +1,16 @@ +--- +all: + hosts: + prusa.lan: + vars: + ansible_user: ubuntu + iron-man.lan: + children: + docker_swarm: + hosts: + node-01.lan: + docker_node: node-01 + node-02.lan: + docker_node: node-02 + node-03.lan: + docker_node: node-03