mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-10 02:47:38 -02:30
Remove unnecessary and risky reload network for resolvconf propagation (#5322)
Change-Id: I54d706f7941b4b86c4c6cd45340295577155b884
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
a005d19f6f
commit
1c25ed669c
@@ -18,7 +18,7 @@
|
||||
create: yes
|
||||
backup: yes
|
||||
marker: "# Ansible entries {mark}"
|
||||
notify: Preinstall | restart network
|
||||
notify: Preinstall | propagate resolvconf to k8s components
|
||||
|
||||
- name: Remove search/domain/nameserver options before block
|
||||
replace:
|
||||
@@ -29,7 +29,7 @@
|
||||
with_nested:
|
||||
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
|
||||
- [ 'search ', 'nameserver ', 'domain ', 'options ' ]
|
||||
notify: Preinstall | restart network
|
||||
notify: Preinstall | propagate resolvconf to k8s components
|
||||
|
||||
- name: Remove search/domain/nameserver options after block
|
||||
replace:
|
||||
@@ -41,7 +41,7 @@
|
||||
with_nested:
|
||||
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
|
||||
- [ 'search ', 'nameserver ', 'domain ', 'options ' ]
|
||||
notify: Preinstall | restart network
|
||||
notify: Preinstall | propagate resolvconf to k8s components
|
||||
|
||||
|
||||
- name: get temporary resolveconf cloud init file content
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
insertbefore: BOF
|
||||
backup: yes
|
||||
marker: "# Ansible entries {mark}"
|
||||
notify: Preinstall | restart network
|
||||
notify: Preinstall | propagate resolvconf to k8s components
|
||||
when: dhclientconffile is defined
|
||||
|
||||
- name: Configure dhclient hooks for resolv.conf (non-RH)
|
||||
@@ -20,7 +20,7 @@
|
||||
dest: "{{ dhclienthookfile }}"
|
||||
owner: root
|
||||
mode: 0755
|
||||
notify: Preinstall | restart network
|
||||
notify: Preinstall | propagate resolvconf to k8s components
|
||||
when: ansible_os_family != "RedHat"
|
||||
|
||||
- name: Configure dhclient hooks for resolv.conf (RH-only)
|
||||
@@ -29,5 +29,5 @@
|
||||
dest: "{{ dhclienthookfile }}"
|
||||
owner: root
|
||||
mode: 0755
|
||||
notify: Preinstall | restart network
|
||||
notify: Preinstall | propagate resolvconf to k8s components
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
backup: yes
|
||||
marker: "# Ansible entries {mark}"
|
||||
when: dhclientconffile is defined
|
||||
notify: Preinstall | restart network
|
||||
notify: Preinstall | propagate resolvconf to k8s components
|
||||
|
||||
- name: Remove kubespray specific dhclient hook
|
||||
file:
|
||||
path: "{{ dhclienthookfile }}"
|
||||
state: absent
|
||||
when: dhclienthookfile is defined
|
||||
notify: Preinstall | restart network
|
||||
notify: Preinstall | propagate resolvconf to k8s components
|
||||
|
||||
Reference in New Issue
Block a user