From 63da3eafca23dc365894d22013c3b7b9cca75d6a Mon Sep 17 00:00:00 2001 From: cradle8810 Date: Tue, 23 Apr 2024 19:16:17 +0900 Subject: [PATCH] Fixed gw4 and dns4 attribute path --- inventories/host_vars/{rui => }/rui.yml | 13 +------------ rui.yml | 2 +- templates/rui/etc/dnsmasq.d/resolv.txt.j2 | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) rename inventories/host_vars/{rui => }/rui.yml (80%) diff --git a/inventories/host_vars/rui/rui.yml b/inventories/host_vars/rui.yml similarity index 80% rename from inventories/host_vars/rui/rui.yml rename to inventories/host_vars/rui.yml index c654335..c86e6ab 100644 --- a/inventories/host_vars/rui/rui.yml +++ b/inventories/host_vars/rui.yml @@ -1,15 +1,4 @@ --- -network: - rui: - hostname: rui.hayaworld.local - interface: ens160 - ipv4: 192.168.1.100 - subnet: 24 - gw4: 192.168.1.1 - dns4: - - 202.232.2.3 - - 202.232.2.2 - apt: - avahi-daemon - binutils @@ -41,7 +30,7 @@ dnsmasq: dhcp_option: ntp_server: 210.130.188.10 dns_server: "{{ network.rui.ipv4 }}" - router: "{{ network.rui.gw4 }}" + router: "{{ network.gw4 }}" netmask: "255.255.255.0" dns: cache_size: 4000 diff --git a/rui.yml b/rui.yml index 87b94e6..01785bf 100644 --- a/rui.yml +++ b/rui.yml @@ -10,7 +10,7 @@ - inventories/host_vars/rui/dhcphosts.yml - inventories/host_vars/rui/ads_hosts/NXDOMAIN.yml - inventories/host_vars/rui/ads_hosts/NXDOMAIN_book_scam.yml - - inventories/host_vars/rui/rui.yml + - inventories/host_vars/rui.yml - inventories/host_vars/hosts_hayaworld.yml - inventories/host_vars/networks.yml diff --git a/templates/rui/etc/dnsmasq.d/resolv.txt.j2 b/templates/rui/etc/dnsmasq.d/resolv.txt.j2 index 2823c80..f15eac5 100644 --- a/templates/rui/etc/dnsmasq.d/resolv.txt.j2 +++ b/templates/rui/etc/dnsmasq.d/resolv.txt.j2 @@ -1,3 +1,3 @@ -{% for resolver in network.rui.dns4 %} +{% for resolver in network.dns4 %} server={{ resolver }} {% endfor %}