fix: add configuration for listen address
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
10eefcae1c
commit
a6998a80ec
4
defauts/main.yml
Normal file
4
defauts/main.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
dnsmasq_listen_address:
|
||||||
|
- "127.0.0.1"
|
||||||
|
- "::1"
|
9
handlers/main.yml
Normal file
9
handlers/main.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
- name: Restart dnsmasq Service
|
||||||
|
service:
|
||||||
|
name: dnsmasq
|
||||||
|
state: restarted
|
||||||
|
daemon_reload: yes
|
||||||
|
enabled: yes
|
||||||
|
listen: __dnsmasq_restart
|
||||||
|
become: True
|
||||||
|
become_user: root
|
@ -1,2 +1,21 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: setup.yml
|
- block:
|
||||||
|
- name: Install package
|
||||||
|
package:
|
||||||
|
name: dnsmasq
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Create dnsmasq configuration
|
||||||
|
template:
|
||||||
|
src: "etc/dnsmasq.d/local.conf.j2"
|
||||||
|
dest: "/etc/dnsmasq.d/local.conf"
|
||||||
|
mode: 0644
|
||||||
|
notify: __dnsmasq_restart
|
||||||
|
|
||||||
|
- name: Ensure dnsmasq is up and running
|
||||||
|
service:
|
||||||
|
name: dnsmasq
|
||||||
|
enabled: True
|
||||||
|
state: started
|
||||||
|
become: True
|
||||||
|
become_user: root
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
- block:
|
|
||||||
- name: Install package
|
|
||||||
package:
|
|
||||||
name: dnsmasq
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Ensure dnsmasq is up and running
|
|
||||||
service:
|
|
||||||
name: dnsmasq
|
|
||||||
enabled: True
|
|
||||||
state: started
|
|
||||||
become: True
|
|
||||||
become_user: root
|
|
1
template/etc/dnsmasq.d/local.conf.j2
Normal file
1
template/etc/dnsmasq.d/local.conf.j2
Normal file
@ -0,0 +1 @@
|
|||||||
|
listen-address={{ dnsmasq_listen_address | join(",") }}
|
Loading…
Reference in New Issue
Block a user