2024-05-03 05:49:09 +00:00
|
|
|
# Do not run this anymore cuz dns masq breaks too much shit at once
|
2024-04-25 04:22:05 +00:00
|
|
|
- name: Install dnsmasq
|
|
|
|
apt:
|
|
|
|
name: dnsmasq
|
|
|
|
- name: Ensure config ready for local network use
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/dnsmasq.conf
|
|
|
|
line: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
loop:
|
|
|
|
- domain-needed
|
|
|
|
- bogus-priv
|
|
|
|
- "cache-size=1000"
|
|
|
|
- "server=208.67.222.222"
|
|
|
|
- "server=208.67.220.220"
|
2024-05-03 05:49:09 +00:00
|
|
|
- "domain=cluster.lan"
|
|
|
|
- "expand-hosts"
|
|
|
|
- "listen-address=127.0.0.1,192.168.1.100"
|
2024-04-25 04:22:05 +00:00
|
|
|
- name: Add entries to the /etc/hosts file
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/hosts
|
|
|
|
line: "192.168.1.100 {{ item }}"
|
|
|
|
loop:
|
|
|
|
- nginx.lan
|
|
|
|
- git.lan
|
|
|
|
- name: Stop resolvd from ever being a thing again
|
|
|
|
systemd_service:
|
|
|
|
name: systemd-resolved
|
|
|
|
state: stopped
|
|
|
|
masked: yes
|
|
|
|
enabled: no
|
|
|
|
- name: Restart the dnsmasq service
|
|
|
|
service:
|
|
|
|
state: restarted
|
|
|
|
name: dnsmasq
|
|
|
|
|