1c25ed669c
Change-Id: I54d706f7941b4b86c4c6cd45340295577155b884
33 lines
1,012 B
YAML
33 lines
1,012 B
YAML
---
|
|
- name: Configure dhclient to supersede search/domain/nameservers
|
|
blockinfile:
|
|
block: |-
|
|
{% for item in [ supersede_domain, supersede_search, supersede_nameserver ] -%}
|
|
{{ item }}
|
|
{% endfor %}
|
|
path: "{{ dhclientconffile }}"
|
|
create: yes
|
|
state: present
|
|
insertbefore: BOF
|
|
backup: yes
|
|
marker: "# Ansible entries {mark}"
|
|
notify: Preinstall | propagate resolvconf to k8s components
|
|
when: dhclientconffile is defined
|
|
|
|
- name: Configure dhclient hooks for resolv.conf (non-RH)
|
|
template:
|
|
src: dhclient_dnsupdate.sh.j2
|
|
dest: "{{ dhclienthookfile }}"
|
|
owner: root
|
|
mode: 0755
|
|
notify: Preinstall | propagate resolvconf to k8s components
|
|
when: ansible_os_family != "RedHat"
|
|
|
|
- name: Configure dhclient hooks for resolv.conf (RH-only)
|
|
template:
|
|
src: dhclient_dnsupdate_rh.sh.j2
|
|
dest: "{{ dhclienthookfile }}"
|
|
owner: root
|
|
mode: 0755
|
|
notify: Preinstall | propagate resolvconf to k8s components
|
|
when: ansible_os_family == "RedHat"
|