add root priv
This commit is contained in:
@@ -3,12 +3,14 @@
|
|||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: dnsmasq
|
name: dnsmasq
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
- name: Ensure dnsmasq is installed
|
- name: Ensure dnsmasq is installed
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
name: dnsmasq
|
name: dnsmasq
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- name: Add host reservation to dnsmasq
|
- name: Add host reservation to dnsmasq
|
||||||
@@ -16,8 +18,9 @@
|
|||||||
path: /etc/dnsmasq.d/hosts.conf
|
path: /etc/dnsmasq.d/hosts.conf
|
||||||
line: "dhcp-host={{ mac_address }},{{ ip_address }},{{ hostname }}"
|
line: "dhcp-host={{ mac_address }},{{ ip_address }},{{ hostname }}"
|
||||||
state: present
|
state: present
|
||||||
|
become: true
|
||||||
- name: Restart dnsmasq service
|
- name: Restart dnsmasq service
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: dnsmasq
|
name: dnsmasq
|
||||||
state: restarted
|
state: restarted
|
||||||
|
become: true
|
||||||
|
|||||||
Reference in New Issue
Block a user