From 00c2b81966dc766016cdaf0b1ade3fc562b21bc1 Mon Sep 17 00:00:00 2001 From: tinnguyennct Date: Fri, 28 May 2021 15:48:10 +0000 Subject: [PATCH 1/3] Tin exercise 01 --- ch1-lab-setup/sample/hosts.ini | 7 ++++++- ch2-inventory/inventory/01-ipOnly.ini | 7 +++---- ch2-inventory/nctin/02-nonFQDN.yml | 9 +++++++++ .../nctin/03-hostgroups-children.yml | 19 +++++++++++++++++++ 4 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 ch2-inventory/nctin/02-nonFQDN.yml create mode 100644 ch2-inventory/nctin/03-hostgroups-children.yml diff --git a/ch1-lab-setup/sample/hosts.ini b/ch1-lab-setup/sample/hosts.ini index 8a716fa..4a5278c 100644 --- a/ch1-lab-setup/sample/hosts.ini +++ b/ch1-lab-setup/sample/hosts.ini @@ -1,2 +1,7 @@ [linux] -192.168.100.21 +172.16.44.103 +172.16.44.231 +172.16.44.172 +#192.168.1.7 +#192.168.1.17 +#192.168.1.31 diff --git a/ch2-inventory/inventory/01-ipOnly.ini b/ch2-inventory/inventory/01-ipOnly.ini index 43895f0..2cb593d 100644 --- a/ch2-inventory/inventory/01-ipOnly.ini +++ b/ch2-inventory/inventory/01-ipOnly.ini @@ -1,7 +1,6 @@ -192.168.100.11 +192.168.1.17 -192.168.100.12 +192.168.1.43 -192.168.100.21 +192.168.1.239 -192.168.100.22 diff --git a/ch2-inventory/nctin/02-nonFQDN.yml b/ch2-inventory/nctin/02-nonFQDN.yml new file mode 100644 index 0000000..2a8e7d4 --- /dev/null +++ b/ch2-inventory/nctin/02-nonFQDN.yml @@ -0,0 +1,9 @@ +all: + hosts: + centos01: + ansible_host: 192.168.1.17 + centos02: + ansible_host: 192.168.1.43 + centos03: + ansible_host: 192.168.1.239 + diff --git a/ch2-inventory/nctin/03-hostgroups-children.yml b/ch2-inventory/nctin/03-hostgroups-children.yml new file mode 100644 index 0000000..a18be1f --- /dev/null +++ b/ch2-inventory/nctin/03-hostgroups-children.yml @@ -0,0 +1,19 @@ +all: + hosts: + fakehost.local: + children: + linux: + children: + ubuntu: + hosts: + ubuntu: + ansible_host: 192.168.1.109 + centos: + hosts: + centos1: + ansible_host: 192.168.1.17 + centos2: + ansible_host: 192.168.1.43 + centos3: + ansible_host: 192.168.1.239 + From 7a019b5da5c53e6672d6f7f46331420161d03f8d Mon Sep 17 00:00:00 2001 From: tinnguyennct Date: Fri, 28 May 2021 15:58:45 +0000 Subject: [PATCH 2/3] Tin commit ex01 --- ch2-inventory/student-nctin/02-nonFQDN.yml | 12 ++++++++++++ .../student-nctin/03-hostgroups-children.yml | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 ch2-inventory/student-nctin/02-nonFQDN.yml create mode 100644 ch2-inventory/student-nctin/03-hostgroups-children.yml diff --git a/ch2-inventory/student-nctin/02-nonFQDN.yml b/ch2-inventory/student-nctin/02-nonFQDN.yml new file mode 100644 index 0000000..a0a0ba2 --- /dev/null +++ b/ch2-inventory/student-nctin/02-nonFQDN.yml @@ -0,0 +1,12 @@ +all: + hosts: + ubuntu01: + ansible_host: 192.168.1.109 + centos01: + ansible_host: 192.168.1.17 + centos02: + ansible_host: 192.168.1.43 + centos03: + ansible_host: 192.168.1.239 + + diff --git a/ch2-inventory/student-nctin/03-hostgroups-children.yml b/ch2-inventory/student-nctin/03-hostgroups-children.yml new file mode 100644 index 0000000..a18be1f --- /dev/null +++ b/ch2-inventory/student-nctin/03-hostgroups-children.yml @@ -0,0 +1,19 @@ +all: + hosts: + fakehost.local: + children: + linux: + children: + ubuntu: + hosts: + ubuntu: + ansible_host: 192.168.1.109 + centos: + hosts: + centos1: + ansible_host: 192.168.1.17 + centos2: + ansible_host: 192.168.1.43 + centos3: + ansible_host: 192.168.1.239 + From a8fb097e851d47db55e6bd5b9ea77e0fa7c05045 Mon Sep 17 00:00:00 2001 From: tinnguyennct Date: Fri, 28 May 2021 16:09:21 +0000 Subject: [PATCH 3/3] Tin ex01 --- ch2-inventory/nctin/02-nonFQDN.yml | 9 --------- .../nctin/03-hostgroups-children.yml | 19 ------------------- 2 files changed, 28 deletions(-) delete mode 100644 ch2-inventory/nctin/02-nonFQDN.yml delete mode 100644 ch2-inventory/nctin/03-hostgroups-children.yml diff --git a/ch2-inventory/nctin/02-nonFQDN.yml b/ch2-inventory/nctin/02-nonFQDN.yml deleted file mode 100644 index 2a8e7d4..0000000 --- a/ch2-inventory/nctin/02-nonFQDN.yml +++ /dev/null @@ -1,9 +0,0 @@ -all: - hosts: - centos01: - ansible_host: 192.168.1.17 - centos02: - ansible_host: 192.168.1.43 - centos03: - ansible_host: 192.168.1.239 - diff --git a/ch2-inventory/nctin/03-hostgroups-children.yml b/ch2-inventory/nctin/03-hostgroups-children.yml deleted file mode 100644 index a18be1f..0000000 --- a/ch2-inventory/nctin/03-hostgroups-children.yml +++ /dev/null @@ -1,19 +0,0 @@ -all: - hosts: - fakehost.local: - children: - linux: - children: - ubuntu: - hosts: - ubuntu: - ansible_host: 192.168.1.109 - centos: - hosts: - centos1: - ansible_host: 192.168.1.17 - centos2: - ansible_host: 192.168.1.43 - centos3: - ansible_host: 192.168.1.239 -