fix linter errors
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
---
|
||||
cache_size: 100
|
||||
dns_port: 5300
|
||||
dnsmasq_cache_size: 100
|
||||
dnsmasq_dns_port: 5300
|
||||
|
||||
@@ -10,8 +10,8 @@ galaxy_info:
|
||||
|
||||
platforms:
|
||||
- name: "Ubuntu"
|
||||
versions: [ "focal", "jammy" ]
|
||||
versions: ["focal", "jammy"]
|
||||
|
||||
galaxy_tags: [ ]
|
||||
galaxy_tags: []
|
||||
|
||||
dependencies: []
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- name: Converge
|
||||
hosts: all
|
||||
roles:
|
||||
- role: genlab.ufw
|
||||
- role: genlab.common.ufw
|
||||
disable_ipv6: true
|
||||
rules:
|
||||
- rule: allow
|
||||
@@ -12,10 +12,10 @@
|
||||
direction: in
|
||||
comment: "Allow dnsmasq to serve DNS queries on the given interface"
|
||||
|
||||
- role: genlab.dnsmasq
|
||||
iface: lo
|
||||
domain: adm.local
|
||||
dns_port: 5300
|
||||
nodes:
|
||||
- role: genlab.common.dnsmasq
|
||||
dnsmasq_iface: lo
|
||||
dnsmasq_domain: adm.local
|
||||
dnsmasq_dns_port: 5300
|
||||
dnsmasq_nodes:
|
||||
- name: hub
|
||||
ip: 127.0.0.1
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
tasks:
|
||||
- name: "Test the output of the `dig` command"
|
||||
changed_when: false
|
||||
register: dig
|
||||
register: dnsmasq_dig
|
||||
failed_when: 'dig.stdout != "127.0.0.1"'
|
||||
ansible.builtin.command:
|
||||
cmd: "dig @127.0.0.1 -p 5353 hub.adm.vpn +short"
|
||||
|
||||
@@ -9,29 +9,29 @@
|
||||
- name: "Create interface-specific configuration file"
|
||||
notify: "Restart dnsmasq"
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/dnsmasq.d/{{ domain }}.conf
|
||||
path: /etc/dnsmasq.d/{{ dnsmasq_domain }}.conf
|
||||
create: true
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0660"
|
||||
block: |
|
||||
interface="{{ iface }}"
|
||||
port="{{ dns_port }}"
|
||||
cache-size="{{ cache_size }}"
|
||||
interface="{{ dnsmasq_iface }}"
|
||||
port="{{ dnsmasq_dns_port }}"
|
||||
cache-size="{{ dnsmasq_cache_size }}"
|
||||
log-queries
|
||||
server=1.1.1.1 # Cloudflare DNS
|
||||
server=8.8.8.8 # Google DNS
|
||||
server=8.8.4.4 # Google DNS (secondary)
|
||||
|
||||
|
||||
- name: "Add nodes to the configuration file"
|
||||
- name: "Add dnsmasq_nodes to the configuration file"
|
||||
notify: "Restart dnsmasq"
|
||||
loop: "{{ nodes }}"
|
||||
loop: "{{ dnsmasq_nodes }}"
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/dnsmasq.d/{{ domain }}.conf
|
||||
marker: "# {mark} ANSIBLE MANAGED: {{ item.name }}.{{ domain }}"
|
||||
path: /etc/dnsmasq.d/{{ dnsmasq_domain }}.conf
|
||||
marker: "# {mark} ANSIBLE MANAGED: {{ item.name }}.{{ dnsmasq_domain }}"
|
||||
block: |
|
||||
address=/{{ item.name }}.{{ domain }}/{{ item.ip }}
|
||||
address=/{{ item.name }}.{{ dnsmasq_domain }}/{{ item.ip }}
|
||||
|
||||
|
||||
- name: "Flush handlers"
|
||||
|
||||
Reference in New Issue
Block a user