Change the way 'debops.dhcpd' gathers nameservers
This commit is contained in:
parent
4052e5e800
commit
271da470fb
@ -18,6 +18,9 @@ v0.1.1
|
|||||||
- Fix a templating error when IPv6 networking is not present on a host.
|
- Fix a templating error when IPv6 networking is not present on a host.
|
||||||
[drybjed]
|
[drybjed]
|
||||||
|
|
||||||
|
- Change the way role gathers the list of nameservers to avoid issue with
|
||||||
|
``sed`` command in shell module. [drybjed]
|
||||||
|
|
||||||
v0.1.0
|
v0.1.0
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -28,14 +28,14 @@
|
|||||||
when: dhcpd_register_relay_debconf|d() and dhcpd_register_relay_debconf.changed
|
when: dhcpd_register_relay_debconf|d() and dhcpd_register_relay_debconf.changed
|
||||||
|
|
||||||
- name: Get list of nameservers configured in /etc/resolv.conf
|
- name: Get list of nameservers configured in /etc/resolv.conf
|
||||||
shell: grep -E '^nameserver\s' /etc/resolv.conf | awk '{print $2}' | sed -e 'N;s/\n/ /'
|
shell: grep -E '^nameserver\s' /etc/resolv.conf | awk '{print $2}'
|
||||||
register: dhcpd_register_nameservers
|
register: dhcpd_register_nameservers
|
||||||
changed_when: False
|
changed_when: False
|
||||||
when: dhcpd_mode == 'server'
|
when: dhcpd_mode == 'server'
|
||||||
|
|
||||||
- name: Convert list of nameservers to Ansible list
|
- name: Convert list of nameservers to Ansible list
|
||||||
set_fact:
|
set_fact:
|
||||||
dhcpd_runtime_nameservers: "{{ dhcpd_register_nameservers.stdout.split(' ') }}"
|
dhcpd_runtime_nameservers: "{{ dhcpd_register_nameservers.stdout_lines }}"
|
||||||
when: (dhcpd_register_nameservers is defined and dhcpd_register_nameservers.stdout)
|
when: (dhcpd_register_nameservers is defined and dhcpd_register_nameservers.stdout)
|
||||||
|
|
||||||
- name: Configure DHCP server
|
- name: Configure DHCP server
|
||||||
|
Loading…
Reference in New Issue
Block a user