From c81c8ca6f42bb5a76bbf660210d20d1eb39c7a11 Mon Sep 17 00:00:00 2001 From: Hayato Date: Wed, 1 May 2024 00:54:17 +0900 Subject: [PATCH 1/8] Add sshpass for console --- inventories/host_vars/console.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/inventories/host_vars/console.yml b/inventories/host_vars/console.yml index 0299fde..28b0324 100644 --- a/inventories/host_vars/console.yml +++ b/inventories/host_vars/console.yml @@ -24,6 +24,7 @@ apt: - p7zip-full - python3-pip - samba-common + - sshpass - vim - vlc - wireshark From c936630294ad119a41ff3fc50a4e41a78cb25731 Mon Sep 17 00:00:00 2001 From: Hayato Date: Wed, 1 May 2024 02:16:15 +0900 Subject: [PATCH 2/8] Add 'mas-cli' for mac --- inventories/host_vars/macbook.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/inventories/host_vars/macbook.yml b/inventories/host_vars/macbook.yml index 166d1fd..7c9ef9f 100644 --- a/inventories/host_vars/macbook.yml +++ b/inventories/host_vars/macbook.yml @@ -10,6 +10,7 @@ brew_taps: - libaacs - libde265 - libheif + - mas - nkf - p7zip - pdftoipe From 3b61a1f76fa4fd8ceb693b07434050902c404922 Mon Sep 17 00:00:00 2001 From: cradle8810 Date: Wed, 1 May 2024 02:44:44 +0900 Subject: [PATCH 3/8] Remove hosts_hayaworld.yml --- inventories/host_vars/hosts_hayaworld.yml | 48 ----------------------- 1 file changed, 48 deletions(-) delete mode 100644 inventories/host_vars/hosts_hayaworld.yml diff --git a/inventories/host_vars/hosts_hayaworld.yml b/inventories/host_vars/hosts_hayaworld.yml deleted file mode 100644 index 663db56..0000000 --- a/inventories/host_vars/hosts_hayaworld.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -hosts_hayaworld: - - A: g - IP: 0.0.0.0 - - A: g.hayaworld.local - IP: 0.0.0.0 - - A: skylark.hayaworld.local - IP: 192.168.1.200 - - A: nuc01.hayaworld.local - IP: 192.168.1.11 - - A: nuc02.hayaworld.local - IP: 192.168.1.12 - - A: vcsa.hayaworld.local - IP: 192.168.1.10 - - A: rui.hayaworld.local - IP: 192.168.1.100 - - A: win10.hayaworld.local - IP: 192.168.1.101 - - A: runner.hayaworld.local - IP: 192.168.1.104 - - A: console.hayaworld.local - IP: 192.168.1.105 - - A: zabbix.hayaworld.local - IP: 192.168.1.106 - - A: docker.hayaworld.local - IP: 192.168.1.107 - - A: ubuntu.hayaworld.local - IP: 192.168.1.110 - - A: step.hayaworld.local - IP: 192.168.1.111 - - A: tm.hayaworld.local - IP: 192.168.1.112 - - A: jenkins.hayaworld.local - IP: 192.168.1.131 - - A: glusternfs.hayaworld.local - IP: 192.168.1.140 - - A: glusternfs001.hayaworld.local - IP: 192.168.1.141 - - A: glusternfs002.hayaworld.local - IP: 192.168.1.142 - - A: glusternfs003.hayaworld.local - IP: 192.168.1.143 - - A: vesxi01.hayaworld.local - IP: 192.168.1.151 - - A: vesxi02.hayaworld.local - IP: 192.168.1.152 - - A: vrli.hayaworld.local - IP: 192.168.1.160 From cbb8c3b32bc11990d2ee9d4e5e6f0ec7c3284d5a Mon Sep 17 00:00:00 2001 From: cradle8810 Date: Wed, 1 May 2024 03:06:13 +0900 Subject: [PATCH 4/8] =?UTF-8?q?Mac=E3=82=92=E5=90=AB=E3=82=80DHCP=E3=81=A7?= =?UTF-8?q?=E3=81=AENetwork=E8=A8=AD=E5=AE=9A=E3=81=AF=E5=88=A5=E3=81=AEdi?= =?UTF-8?q?ct=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventories/host_vars/networks.yml | 3 ++- macbook.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inventories/host_vars/networks.yml b/inventories/host_vars/networks.yml index 0bd9af4..0daffea 100644 --- a/inventories/host_vars/networks.yml +++ b/inventories/host_vars/networks.yml @@ -45,11 +45,12 @@ network: interface: ens160 ipv4: 192.168.1.200 shortname: skylark + +network_dhcp: macbook: hostname: HayabookAir2023.hayaworld.local shortname: HayabookAir2023 - subnet: mask: 24 gw4: 192.168.1.1 diff --git a/macbook.yml b/macbook.yml index ee94d50..448f2ab 100644 --- a/macbook.yml +++ b/macbook.yml @@ -12,7 +12,7 @@ tasks: - name: Set Hostname ansible.builtin.hostname: - name: "{{ network.macbook.hostname }}" + name: "{{ network_dhcp.macbook.hostname }}" become: true tags: - network From 1d11e452b6c03798e6869196666fbeb0f4ad2762 Mon Sep 17 00:00:00 2001 From: cradle8810 Date: Wed, 1 May 2024 03:07:43 +0900 Subject: [PATCH 5/8] =?UTF-8?q?hosts=5Fhayaworld.yml=E3=81=AE=E5=BB=83?= =?UTF-8?q?=E6=AD=A2=E3=81=AB=E4=BC=B4=E3=81=84=E3=83=AA=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=AF=E3=82=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rui.yml | 1 - templates/rui/etc/hosts.j2 | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rui.yml b/rui.yml index ff4483e..8631a5f 100644 --- a/rui.yml +++ b/rui.yml @@ -11,7 +11,6 @@ - inventories/host_vars/rui/ads_hosts/NXDOMAIN.yml - inventories/host_vars/rui/ads_hosts/NXDOMAIN_book_scam.yml - inventories/host_vars/rui.yml - - inventories/host_vars/hosts_hayaworld.yml - inventories/host_vars/networks.yml handlers: diff --git a/templates/rui/etc/hosts.j2 b/templates/rui/etc/hosts.j2 index 303b6e6..71cec9b 100644 --- a/templates/rui/etc/hosts.j2 +++ b/templates/rui/etc/hosts.j2 @@ -1,6 +1,6 @@ 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 -{% for item in hosts_hayaworld %} -{{ item.IP }} {{ item.A }} +{% for host in network.values() %} +{{ host.ipv4 }} {{ host.hostname }} {% endfor %} From cd1e3e12cd1e23aab3e524820aa6038ecb49b1ed Mon Sep 17 00:00:00 2001 From: cradle8810 Date: Wed, 1 May 2024 03:24:41 +0900 Subject: [PATCH 6/8] =?UTF-8?q?IP=E3=82=A2=E3=83=89=E3=83=AC=E3=82=B9?= =?UTF-8?q?=E8=AA=A4=E3=82=8A=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventories/host_vars/networks.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/inventories/host_vars/networks.yml b/inventories/host_vars/networks.yml index 0daffea..a8b2236 100644 --- a/inventories/host_vars/networks.yml +++ b/inventories/host_vars/networks.yml @@ -33,7 +33,7 @@ network: jenkins: hostname: jenkins.hayaworld.local interface: ens160 - ipv4: 192.168.1.111 + ipv4: 192.168.1.131 shortname: jenkins tm: hostname: tm.hayaworld.local @@ -45,6 +45,21 @@ network: interface: ens160 ipv4: 192.168.1.200 shortname: skylark + step: + hostname: step.hayaworld.local + interface: ens160 + ipv4: 192.168.1.111 + shortname: step + win10: + hostname: step.hayaworld.local + interface: ens160 + ipv4: 192.168.1.101 + shortname: win10 + zabbix: + hostname: zabbix.hayaworld.local + interface: ens160 + ipv4: 192.168.1.106 + shortname: zabbix network_dhcp: macbook: From b51f97ce1378ce8b72bd377193dd25b35f1ddba2 Mon Sep 17 00:00:00 2001 From: cradle8810 Date: Wed, 1 May 2024 03:27:19 +0900 Subject: [PATCH 7/8] =?UTF-8?q?network=E3=81=AE=E3=82=BD=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventories/host_vars/networks.yml | 40 ++++++++++++++---------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/inventories/host_vars/networks.yml b/inventories/host_vars/networks.yml index a8b2236..6521b0e 100644 --- a/inventories/host_vars/networks.yml +++ b/inventories/host_vars/networks.yml @@ -5,6 +5,11 @@ network: interface: ens160 ipv4: 192.168.1.100 shortname: rui + win10: + hostname: step.hayaworld.local + interface: ens160 + ipv4: 192.168.1.101 + shortname: win10 console: hostname: console.hayaworld.local interface: ens160 @@ -15,11 +20,11 @@ network: interface: ens160 ipv4: 192.168.1.104 shortname: runner - docker: - hostname: docker.hayaworld.local + zabbix: + hostname: zabbix.hayaworld.local interface: ens160 ipv4: 192.168.1.106 - shortname: docker + shortname: zabbix haru: hostname: haru.hayaworld.local interface: ens160 @@ -30,36 +35,27 @@ network: interface: ens160 ipv4: 192.168.1.109 shortname: bsd - jenkins: - hostname: jenkins.hayaworld.local + step: + hostname: step.hayaworld.local interface: ens160 - ipv4: 192.168.1.131 - shortname: jenkins + ipv4: 192.168.1.111 + shortname: step tm: hostname: tm.hayaworld.local interface: ens160 ipv4: 192.168.1.112 shortname: tm + jenkins: + hostname: jenkins.hayaworld.local + interface: ens160 + ipv4: 192.168.1.131 + shortname: jenkins skylark: hostname: skylark.hayaworld.local interface: ens160 ipv4: 192.168.1.200 shortname: skylark - step: - hostname: step.hayaworld.local - interface: ens160 - ipv4: 192.168.1.111 - shortname: step - win10: - hostname: step.hayaworld.local - interface: ens160 - ipv4: 192.168.1.101 - shortname: win10 - zabbix: - hostname: zabbix.hayaworld.local - interface: ens160 - ipv4: 192.168.1.106 - shortname: zabbix + network_dhcp: macbook: From 6f0f5ca1d9d5b20f9e63304ff57ecdf4528983bc Mon Sep 17 00:00:00 2001 From: cradle8810 Date: Wed, 1 May 2024 04:53:47 +0900 Subject: [PATCH 8/8] =?UTF-8?q?Ansible=E3=81=A8=E9=96=A2=E4=BF=82=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 14 -------------- ip_range.txt | 15 --------------- netplan.sample.yml | 14 -------------- 3 files changed, 43 deletions(-) delete mode 100644 .gitlab-ci.yml delete mode 100644 ip_range.txt delete mode 100644 netplan.sample.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index e0bf3a3..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -stages: - - lint - -duplicate_check: - image: alpine:latest - stage: lint - script: - - "chmod +x ./dupcheck.sh" - - > - "./dupcheck.sh" - "inventories/host_vars/ads_hosts/NXDOMAIN.yml" - tags: - - docker diff --git a/ip_range.txt b/ip_range.txt deleted file mode 100644 index eda0c9e..0000000 --- a/ip_range.txt +++ /dev/null @@ -1,15 +0,0 @@ -192.168.1.1 Gateway -192.168.1.2 - 192.168.1.9 RESERVED -192.168.1.10 vCenter -192.168.1.11 nuc01 -192.168.1.12 - 192.168.1.20 RESERVED for more nuc vmk0 -192.168.1.21 - 192.168.1.49 DHCP range -192.168.1.50 SW -192.168.1.51 rui(dns_sub) -192.168.1.52 - 192.168.1.99 static ip range -192.168.1.100 rui (dns/dhcp) -192.168.1.101 win10 -192.168.1.102 vpn -192.168.1.101 - 192.168.1.199 VM range -192.168.1.200 skylark -192.168.1.201 - 192.168.1.202 \ No newline at end of file diff --git a/netplan.sample.yml b/netplan.sample.yml deleted file mode 100644 index 190a5cf..0000000 --- a/netplan.sample.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- - -network: - ethernets: - ens160: - addresses: - - 192.168.1.106/24 - gateway4: 192.168.1.1 - nameservers: - addresses: - - 192.168.1.100 - search: - - local - version: 2