2016-11-30 13:06:11 +00:00
|
|
|
---
|
2016-12-13 14:43:05 +00:00
|
|
|
- name: Configure dhclient to supersede search/domain/nameservers
|
2016-11-30 13:06:11 +00:00
|
|
|
blockinfile:
|
|
|
|
block: |-
|
2016-12-13 14:43:05 +00:00
|
|
|
{% for item in [ supersede_domain, supersede_search, supersede_nameserver ] -%}
|
2016-11-30 13:06:11 +00:00
|
|
|
{{ item }}
|
|
|
|
{% endfor %}
|
2019-05-02 21:24:21 +00:00
|
|
|
path: "{{ dhclientconffile }}"
|
2016-11-30 13:06:11 +00:00
|
|
|
create: yes
|
|
|
|
state: present
|
|
|
|
insertbefore: BOF
|
|
|
|
backup: yes
|
|
|
|
marker: "# Ansible entries {mark}"
|
2021-07-12 07:00:47 +00:00
|
|
|
mode: 0644
|
2019-11-06 18:11:52 +00:00
|
|
|
notify: Preinstall | propagate resolvconf to k8s components
|
2016-11-30 13:06:11 +00:00
|
|
|
|
2018-04-05 22:54:58 +00:00
|
|
|
- name: Configure dhclient hooks for resolv.conf (non-RH)
|
2016-11-30 13:06:11 +00:00
|
|
|
template:
|
|
|
|
src: dhclient_dnsupdate.sh.j2
|
|
|
|
dest: "{{ dhclienthookfile }}"
|
|
|
|
owner: root
|
|
|
|
mode: 0755
|
2019-11-06 18:11:52 +00:00
|
|
|
notify: Preinstall | propagate resolvconf to k8s components
|
2021-12-09 22:09:06 +00:00
|
|
|
when: ansible_os_family not in [ "RedHat", "Suse" ]
|
2016-11-30 13:06:11 +00:00
|
|
|
|
2018-04-05 22:54:58 +00:00
|
|
|
- name: Configure dhclient hooks for resolv.conf (RH-only)
|
2016-11-30 13:06:11 +00:00
|
|
|
template:
|
|
|
|
src: dhclient_dnsupdate_rh.sh.j2
|
|
|
|
dest: "{{ dhclienthookfile }}"
|
|
|
|
owner: root
|
|
|
|
mode: 0755
|
2019-11-06 18:11:52 +00:00
|
|
|
notify: Preinstall | propagate resolvconf to k8s components
|
2016-11-30 13:06:11 +00:00
|
|
|
when: ansible_os_family == "RedHat"
|