Merge "unbound: fix dhclient.conf copy"
This commit is contained in:
commit
c7f2cca1fa
11
playbooks/roles/unbound/tasks/dhclient.yaml
Normal file
11
playbooks/roles/unbound/tasks/dhclient.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- name: Register dhclient config file
|
||||||
|
stat:
|
||||||
|
path: "{{ item }}"
|
||||||
|
register: _dhclient
|
||||||
|
|
||||||
|
- name: Write dhclient config file
|
||||||
|
when: _dhclient.stat.exists | bool
|
||||||
|
copy:
|
||||||
|
src: dhclient.conf
|
||||||
|
dest: "{{ item }}"
|
||||||
|
mode: 0444
|
@ -11,12 +11,8 @@
|
|||||||
state: present
|
state: present
|
||||||
name: unbound
|
name: unbound
|
||||||
|
|
||||||
- name: Write dhclient config file
|
- name: Write dhclient config files
|
||||||
copy:
|
include_tasks: dhclient.yaml
|
||||||
src: dhclient.conf
|
|
||||||
dest: "{{ item }}"
|
|
||||||
mode: 0444
|
|
||||||
when: item is file
|
|
||||||
loop:
|
loop:
|
||||||
- /etc/dhcp/dhclient.conf
|
- /etc/dhcp/dhclient.conf
|
||||||
- /etc/dhcp/dhclient-eth0.conf
|
- /etc/dhcp/dhclient-eth0.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user