From 9ff3aba48fe218b1f4d70483142942725e0db4cb Mon Sep 17 00:00:00 2001 From: hungts Date: Sat, 29 May 2021 14:32:08 +0700 Subject: [PATCH 1/2] Update chapter 2 --- ch1-lab-setup/sample/hosts.ini | 8 ++++++++ ch2-inventory/ansible.cfg | 2 +- ...oups-children copy.ini => 03-hostgroups-children.ini} | 0 ch2-inventory/inventory/04-hostvars.ini | 9 ++++----- ch2-inventory/inventory/group_vars/all.ini | 1 - ch2-inventory/inventory/host_vars/ubuntu11.ini | 1 - 6 files changed, 13 insertions(+), 8 deletions(-) rename ch2-inventory/inventory/{03-hostgroups-children copy.ini => 03-hostgroups-children.ini} (100%) delete mode 100644 ch2-inventory/inventory/group_vars/all.ini delete mode 100644 ch2-inventory/inventory/host_vars/ubuntu11.ini diff --git a/ch1-lab-setup/sample/hosts.ini b/ch1-lab-setup/sample/hosts.ini index 8a716fa..5751aeb 100644 --- a/ch1-lab-setup/sample/hosts.ini +++ b/ch1-lab-setup/sample/hosts.ini @@ -1,2 +1,10 @@ [linux] 192.168.100.21 + + +[all:vars] +featureA=disabled + + +[dev:vars] +featureA=enabled \ No newline at end of file diff --git a/ch2-inventory/ansible.cfg b/ch2-inventory/ansible.cfg index 9119ec0..621af78 100644 --- a/ch2-inventory/ansible.cfg +++ b/ch2-inventory/ansible.cfg @@ -1,3 +1,3 @@ [defaults] host_key_checking = False -inventory = inventory \ No newline at end of file +inventory = inventory/03-hostgroups-children.ini \ No newline at end of file diff --git a/ch2-inventory/inventory/03-hostgroups-children copy.ini b/ch2-inventory/inventory/03-hostgroups-children.ini similarity index 100% rename from ch2-inventory/inventory/03-hostgroups-children copy.ini rename to ch2-inventory/inventory/03-hostgroups-children.ini diff --git a/ch2-inventory/inventory/04-hostvars.ini b/ch2-inventory/inventory/04-hostvars.ini index 15f623f..5952d5a 100644 --- a/ch2-inventory/inventory/04-hostvars.ini +++ b/ch2-inventory/inventory/04-hostvars.ini @@ -1,13 +1,12 @@ fakehost.local [ubuntu] -ubuntu11 ansible_host=192.168.100.11 foo=bar -ubuntu12 ansible_host=192.168.100.12 +ubuntu11 +ubuntu12 [centos] -centos21 ansible_host=192.168.100.21 -centos22 ansible_host=192.168.100.22 - +centos21 +centos22 [linux:children] ubuntu diff --git a/ch2-inventory/inventory/group_vars/all.ini b/ch2-inventory/inventory/group_vars/all.ini deleted file mode 100644 index 4dd47cb..0000000 --- a/ch2-inventory/inventory/group_vars/all.ini +++ /dev/null @@ -1 +0,0 @@ -foo=bar4 \ No newline at end of file diff --git a/ch2-inventory/inventory/host_vars/ubuntu11.ini b/ch2-inventory/inventory/host_vars/ubuntu11.ini deleted file mode 100644 index 67d3b24..0000000 --- a/ch2-inventory/inventory/host_vars/ubuntu11.ini +++ /dev/null @@ -1 +0,0 @@ -foo=barbarbar \ No newline at end of file From f96cfb3d2d76dd27ae9a4a6ccc1471464101f8fc Mon Sep 17 00:00:00 2001 From: Hung Tran Date: Mon, 7 Jun 2021 19:56:25 +0700 Subject: [PATCH 2/2] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 98e7dfd..e1a9393 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,5 @@ git push ``` - Create PR + +## Testing