From f94deb4f4c6068c838c85d32fa1acc6d6a4e2dd9 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sat, 29 May 2021 16:40:30 +0000 Subject: [PATCH 01/18] Update test1.txt --- ch2-inventory/student-trungdc/test1.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ch2-inventory/student-trungdc/test1.txt diff --git a/ch2-inventory/student-trungdc/test1.txt b/ch2-inventory/student-trungdc/test1.txt new file mode 100644 index 0000000..8173172 --- /dev/null +++ b/ch2-inventory/student-trungdc/test1.txt @@ -0,0 +1,2 @@ +ccccccc +test From ecf48b9857b80b47d625fc376c427bb5a2532bfb Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 04:38:55 +0000 Subject: [PATCH 02/18] Update 01-ipOnly.yml --- ch2-inventory/student-trungdc/01-ipOnly.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 ch2-inventory/student-trungdc/01-ipOnly.yml diff --git a/ch2-inventory/student-trungdc/01-ipOnly.yml b/ch2-inventory/student-trungdc/01-ipOnly.yml new file mode 100644 index 0000000..c3b016c --- /dev/null +++ b/ch2-inventory/student-trungdc/01-ipOnly.yml @@ -0,0 +1,5 @@ +192.168.100.12 + +192.168.100.21 + +192.168.100.22 From 2111f292f516d8c525911d2fc1802a049dd0ce3c Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 04:50:01 +0000 Subject: [PATCH 03/18] Update 2-nonFQDN.yml --- ch2-inventory/student-trungdc/02-nonFQDN.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 ch2-inventory/student-trungdc/02-nonFQDN.yml diff --git a/ch2-inventory/student-trungdc/02-nonFQDN.yml b/ch2-inventory/student-trungdc/02-nonFQDN.yml new file mode 100644 index 0000000..4fe4f59 --- /dev/null +++ b/ch2-inventory/student-trungdc/02-nonFQDN.yml @@ -0,0 +1,7 @@ +ubuntu11 ansible_host=192.168.100.11 + +ubuntu12 ansible_host=192.168.100.12 + +centos21 ansible_host=192.168.100.21 + +centos22 ansible_host=192.168.100.22 From ed006a4d317334fec9be95695e773e505c2e2097 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 05:07:11 +0000 Subject: [PATCH 04/18] Update 03-hostgroups-children.yml --- .../student-trungdc/03-hostgroups-children.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ch2-inventory/student-trungdc/03-hostgroups-children.yml diff --git a/ch2-inventory/student-trungdc/03-hostgroups-children.yml b/ch2-inventory/student-trungdc/03-hostgroups-children.yml new file mode 100644 index 0000000..3e8bfef --- /dev/null +++ b/ch2-inventory/student-trungdc/03-hostgroups-children.yml @@ -0,0 +1,15 @@ +fakehost.local + +[ubuntu] +ubuntu11 ansible_host=192.168.100.11 +ubuntu12 ansible_host=192.168.100.12 + +[centos] +centos21 ansible_host=192.168.100.21 +centos22 ansible_host=192.168.100.22 + + +[linux:children] +ubuntu +centos + From d5e6cbe34eda2a1be36e11d77c6c0c2bc4d7692a Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 05:08:14 +0000 Subject: [PATCH 05/18] 04-hostvars.yml --- ch2-inventory/student-trungdc/04-hostvars.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ch2-inventory/student-trungdc/04-hostvars.yml diff --git a/ch2-inventory/student-trungdc/04-hostvars.yml b/ch2-inventory/student-trungdc/04-hostvars.yml new file mode 100644 index 0000000..15f623f --- /dev/null +++ b/ch2-inventory/student-trungdc/04-hostvars.yml @@ -0,0 +1,24 @@ +fakehost.local + +[ubuntu] +ubuntu11 ansible_host=192.168.100.11 foo=bar +ubuntu12 ansible_host=192.168.100.12 + +[centos] +centos21 ansible_host=192.168.100.21 +centos22 ansible_host=192.168.100.22 + + +[linux:children] +ubuntu +centos + +[all:vars] +foo=bar3 + +[linux:vars] +foo=bar1 + +[ubuntu:vars] +foo=bar2 + From 0ac30c07db34005d2da15629e6d10387c3d78e53 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 05:14:19 +0000 Subject: [PATCH 06/18] remove tes1.txt --- ch2-inventory/student-trungdc/test1.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 ch2-inventory/student-trungdc/test1.txt diff --git a/ch2-inventory/student-trungdc/test1.txt b/ch2-inventory/student-trungdc/test1.txt deleted file mode 100644 index 8173172..0000000 --- a/ch2-inventory/student-trungdc/test1.txt +++ /dev/null @@ -1,2 +0,0 @@ -ccccccc -test From dad51692d9b46950a6806ba0938242743b89c720 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 06:03:59 +0000 Subject: [PATCH 07/18] update 02-nonFQDN.yml --- ch2-inventory/student-trungdc/02-nonFQDN.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ch2-inventory/student-trungdc/02-nonFQDN.yml b/ch2-inventory/student-trungdc/02-nonFQDN.yml index 4fe4f59..8293cb7 100644 --- a/ch2-inventory/student-trungdc/02-nonFQDN.yml +++ b/ch2-inventory/student-trungdc/02-nonFQDN.yml @@ -1,7 +1,10 @@ -ubuntu11 ansible_host=192.168.100.11 - -ubuntu12 ansible_host=192.168.100.12 - -centos21 ansible_host=192.168.100.21 - -centos22 ansible_host=192.168.100.22 +all: + host : + ubuntu11: + ansible_host=192.168.100.11: + ubuntu12 : + ansible_host=192.168.100.12: + centos21 : + ansible_host=192.168.100.21: + centos22 : + ansible_host=192.168.100.22: From 1efc0d2b1b8837fcd47fcf28960e0b659d772167 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 06:37:39 +0000 Subject: [PATCH 08/18] update 02-nonFQDN.yml --- ch2-inventory/student-trungdc/02-nonFQDN.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ch2-inventory/student-trungdc/02-nonFQDN.yml b/ch2-inventory/student-trungdc/02-nonFQDN.yml index 8293cb7..394b4db 100644 --- a/ch2-inventory/student-trungdc/02-nonFQDN.yml +++ b/ch2-inventory/student-trungdc/02-nonFQDN.yml @@ -1,10 +1,10 @@ all: - host : - ubuntu11: - ansible_host=192.168.100.11: - ubuntu12 : - ansible_host=192.168.100.12: - centos21 : - ansible_host=192.168.100.21: - centos22 : - ansible_host=192.168.100.22: + host: + ubuntu11: + ansible_host=192.168.100.11: + ubuntu12: + ansible_host=192.168.100.12: + centos21: + ansible_host=192.168.100.21: + centos22: + ansible_host=192.168.100.22: From 5b81eb37e60506b80fa6dc44e687856061c68bfc Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 06:51:06 +0000 Subject: [PATCH 09/18] update 03-hostgroups-children.yml --- .../03-hostgroups-children.yml | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/ch2-inventory/student-trungdc/03-hostgroups-children.yml b/ch2-inventory/student-trungdc/03-hostgroups-children.yml index 3e8bfef..b827084 100644 --- a/ch2-inventory/student-trungdc/03-hostgroups-children.yml +++ b/ch2-inventory/student-trungdc/03-hostgroups-children.yml @@ -1,15 +1,10 @@ -fakehost.local - -[ubuntu] -ubuntu11 ansible_host=192.168.100.11 -ubuntu12 ansible_host=192.168.100.12 - -[centos] -centos21 ansible_host=192.168.100.21 -centos22 ansible_host=192.168.100.22 - - -[linux:children] -ubuntu -centos - +all: + host: + fakehost.local: + children: + ubuntu: + ubuntu11 ansible_host=192.168.100.11: + ubuntu12 ansible_host=192.168.100.12: + centos: + centos21 ansible_host=192.168.100.21: + centos22 ansible_host=192.168.100.22: From 4552d0809fb25e344ae47c043844296ccd58a17f Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 10:13:39 +0000 Subject: [PATCH 10/18] update 02-nonFQDN.yml --- ch2-inventory/student-trungdc/02-nonFQDN.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/ch2-inventory/student-trungdc/02-nonFQDN.yml b/ch2-inventory/student-trungdc/02-nonFQDN.yml index 394b4db..afc18e1 100644 --- a/ch2-inventory/student-trungdc/02-nonFQDN.yml +++ b/ch2-inventory/student-trungdc/02-nonFQDN.yml @@ -1,10 +1,8 @@ -all: - host: - ubuntu11: - ansible_host=192.168.100.11: - ubuntu12: - ansible_host=192.168.100.12: - centos21: - ansible_host=192.168.100.21: - centos22: - ansible_host=192.168.100.22: +ubuntu11: + ansible_host:192.168.100.11 +ubuntu12: + ansible_host:192.168.100.12 +centos21: + ansible_host:192.168.100.21 +centos22: + ansible_host:192.168.100.22 From 673737a4631d730f6720dbf0c847c0f41eba8af5 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 11:05:35 +0000 Subject: [PATCH 11/18] update 03-hostgroups-children.yml --- .../03-hostgroups-children.yml | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/ch2-inventory/student-trungdc/03-hostgroups-children.yml b/ch2-inventory/student-trungdc/03-hostgroups-children.yml index b827084..3c2263a 100644 --- a/ch2-inventory/student-trungdc/03-hostgroups-children.yml +++ b/ch2-inventory/student-trungdc/03-hostgroups-children.yml @@ -1,10 +1,18 @@ all: - host: + hosts: fakehost.local: children: - ubuntu: - ubuntu11 ansible_host=192.168.100.11: - ubuntu12 ansible_host=192.168.100.12: - centos: - centos21 ansible_host=192.168.100.21: - centos22 ansible_host=192.168.100.22: + linux: + children: + ubuntu: + hosts: + ubuntu11: + ansible_host:192.168.100.11 + ubuntu12: + ansible_host:192.168.100.12 + centos: + hosts: + centos21: + ansible_host:192.168.100.21 + centos22: + ansible_host:192.168.100.22 From 3eaed8bf2645748c9aac69e869d5006d8734a733 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 15:00:21 +0000 Subject: [PATCH 12/18] 02-nonFQDN.yml --- ch2-inventory/student-trungdc/02-nonFQDN.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/ch2-inventory/student-trungdc/02-nonFQDN.yml b/ch2-inventory/student-trungdc/02-nonFQDN.yml index afc18e1..10940d9 100644 --- a/ch2-inventory/student-trungdc/02-nonFQDN.yml +++ b/ch2-inventory/student-trungdc/02-nonFQDN.yml @@ -1,8 +1,12 @@ -ubuntu11: - ansible_host:192.168.100.11 -ubuntu12: - ansible_host:192.168.100.12 -centos21: - ansible_host:192.168.100.21 -centos22: - ansible_host:192.168.100.22 +all: + children: + ungrouped: + hosts: + centos21: + ansible_host: 192.168.100.21 + centos22: + ansible_host: 192.168.100.22 + ubuntu11: + ansible_host: 192.168.100.11 + ubuntu12: + ansible_host: 192.168.100.12 From 372bda29e980c4e61a38afaec9bb0dc340b6497c Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 15:00:48 +0000 Subject: [PATCH 13/18] 03-hostgroups-children.yml --- .../03-hostgroups-children.yml | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ch2-inventory/student-trungdc/03-hostgroups-children.yml b/ch2-inventory/student-trungdc/03-hostgroups-children.yml index 3c2263a..982052e 100644 --- a/ch2-inventory/student-trungdc/03-hostgroups-children.yml +++ b/ch2-inventory/student-trungdc/03-hostgroups-children.yml @@ -1,18 +1,19 @@ all: - hosts: - fakehost.local: children: linux: children: - ubuntu: - hosts: - ubuntu11: - ansible_host:192.168.100.11 - ubuntu12: - ansible_host:192.168.100.12 centos: hosts: centos21: - ansible_host:192.168.100.21 + ansible_host: 192.168.100.21 centos22: - ansible_host:192.168.100.22 + ansible_host: 192.168.100.22 + ubuntu: + hosts: + ubuntu11: + ansible_host: 192.168.100.11 + ubuntu12: + ansible_host: 192.168.100.12 + ungrouped: + hosts: + fakehost.local: {} From 0a25e109b6ce8d52ad16f722963681267ea6f4f2 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 15:01:13 +0000 Subject: [PATCH 14/18] 04-hostvars.yml --- ch2-inventory/student-trungdc/04-hostvars.yml | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/ch2-inventory/student-trungdc/04-hostvars.yml b/ch2-inventory/student-trungdc/04-hostvars.yml index 15f623f..f122bc8 100644 --- a/ch2-inventory/student-trungdc/04-hostvars.yml +++ b/ch2-inventory/student-trungdc/04-hostvars.yml @@ -1,24 +1,24 @@ -fakehost.local - -[ubuntu] -ubuntu11 ansible_host=192.168.100.11 foo=bar -ubuntu12 ansible_host=192.168.100.12 - -[centos] -centos21 ansible_host=192.168.100.21 -centos22 ansible_host=192.168.100.22 - - -[linux:children] -ubuntu -centos - -[all:vars] -foo=bar3 - -[linux:vars] -foo=bar1 - -[ubuntu:vars] -foo=bar2 - +all: + children: + linux: + children: + centos: + hosts: + centos21: + ansible_host: 192.168.100.21 + foo: bar1 + centos22: + ansible_host: 192.168.100.22 + foo: bar1 + ubuntu: + hosts: + ubuntu11: + ansible_host: 192.168.100.11 + foo: bar + ubuntu12: + ansible_host: 192.168.100.12 + foo: bar2 + ungrouped: + hosts: + fakehost.local: + foo: bar3 From 38c1404b31dd246fbdbc51541fe3c7130fe19a09 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Sun, 30 May 2021 15:15:11 +0000 Subject: [PATCH 15/18] RM 01-ipOnly.yml --- ch2-inventory/student-trungdc/01-ipOnly.yml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 ch2-inventory/student-trungdc/01-ipOnly.yml diff --git a/ch2-inventory/student-trungdc/01-ipOnly.yml b/ch2-inventory/student-trungdc/01-ipOnly.yml deleted file mode 100644 index c3b016c..0000000 --- a/ch2-inventory/student-trungdc/01-ipOnly.yml +++ /dev/null @@ -1,5 +0,0 @@ -192.168.100.12 - -192.168.100.21 - -192.168.100.22 From 41c20c2ee79b23e8cd5ab5463e323790680c7b18 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Thu, 3 Jun 2021 07:40:52 +0700 Subject: [PATCH 16/18] update 02-nonFQDN.yml --- ch2-inventory/student-trungdc/02-nonFQDN.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/ch2-inventory/student-trungdc/02-nonFQDN.yml b/ch2-inventory/student-trungdc/02-nonFQDN.yml index 10940d9..fd57342 100644 --- a/ch2-inventory/student-trungdc/02-nonFQDN.yml +++ b/ch2-inventory/student-trungdc/02-nonFQDN.yml @@ -1,12 +1,10 @@ all: - children: - ungrouped: - hosts: - centos21: - ansible_host: 192.168.100.21 - centos22: - ansible_host: 192.168.100.22 - ubuntu11: - ansible_host: 192.168.100.11 - ubuntu12: - ansible_host: 192.168.100.12 + hosts: + centos21: + ansible_host: 192.168.100.21 + centos22: + ansible_host: 192.168.100.22 + ubuntu11: + ansible_host: 192.168.100.11 + ubuntu12: + ansible_host: 192.168.100.12 From 5b02e88da00ab860598796c9a06933e59f63a162 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Thu, 3 Jun 2021 07:53:48 +0700 Subject: [PATCH 17/18] update 03-hostgroups-children.yml --- ch2-inventory/student-trungdc/03-hostgroups-children.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ch2-inventory/student-trungdc/03-hostgroups-children.yml b/ch2-inventory/student-trungdc/03-hostgroups-children.yml index 982052e..ed750b5 100644 --- a/ch2-inventory/student-trungdc/03-hostgroups-children.yml +++ b/ch2-inventory/student-trungdc/03-hostgroups-children.yml @@ -14,6 +14,5 @@ all: ansible_host: 192.168.100.11 ubuntu12: ansible_host: 192.168.100.12 - ungrouped: - hosts: - fakehost.local: {} + hosts: + fakehost.local From 31ba828bb911e9426e5fd7ee21d045b9787a74e7 Mon Sep 17 00:00:00 2001 From: trungdc83 Date: Thu, 3 Jun 2021 08:02:17 +0700 Subject: [PATCH 18/18] update 04-hostvars.yml --- ch2-inventory/student-trungdc/04-hostvars.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ch2-inventory/student-trungdc/04-hostvars.yml b/ch2-inventory/student-trungdc/04-hostvars.yml index f122bc8..2cf8c58 100644 --- a/ch2-inventory/student-trungdc/04-hostvars.yml +++ b/ch2-inventory/student-trungdc/04-hostvars.yml @@ -18,7 +18,6 @@ all: ubuntu12: ansible_host: 192.168.100.12 foo: bar2 - ungrouped: - hosts: - fakehost.local: - foo: bar3 + hosts: + fakehost.local: + foo: bar3