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/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 diff --git a/inventories/host_vars/hosts_hayaworld.yml b/inventories/host_vars/hosts_hayaworld.yml deleted file mode 100644 index 3b40de3..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: ubuntu2404.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 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 diff --git a/inventories/host_vars/networks.yml b/inventories/host_vars/networks.yml index 63224f8..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,16 +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 - ubuntu2404: - hostname: ubuntu2404.hayaworld.local - interface: ens160 - ipv4: 192.168.1.107 - shortname: ubuntu2404 + shortname: zabbix haru: hostname: haru.hayaworld.local interface: ens160 @@ -35,26 +35,33 @@ 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.111 - shortname: jenkins + 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 + + +network_dhcp: macbook: hostname: HayabookAir2023.hayaworld.local shortname: HayabookAir2023 - subnet: mask: 24 gw4: 192.168.1.1 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/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 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 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 %}