From f67bca31a464e2f671bf5cbba78a2f6b1965ad22 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Sat, 11 Apr 2020 00:15:37 +0200 Subject: [PATCH] switch to inventory in yaml --- ansible.cfg | 2 +- hosts | 10 ---------- hosts.yml | 6 ------ inventory/hosts.yml | 16 ++++++++++++++++ 4 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 hosts delete mode 100644 hosts.yml create mode 100644 inventory/hosts.yml 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