mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-21 07:47:49 -02:30
Replace injected Ansible fact variables with ansible_facts in preinstall role (#13232)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Create temporary resolveconf cloud init file
|
||||
command: cp -f /etc/resolv.conf "{{ resolvconffile }}"
|
||||
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
|
||||
- name: Add domain/search/nameservers/options to resolv.conf
|
||||
blockinfile:
|
||||
@@ -45,7 +45,7 @@
|
||||
- name: Get temporary resolveconf cloud init file content
|
||||
command: cat {{ resolvconffile }}
|
||||
register: cloud_config
|
||||
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
|
||||
- name: Persist resolvconf cloud init file
|
||||
template:
|
||||
@@ -54,4 +54,4 @@
|
||||
owner: root
|
||||
mode: "0644"
|
||||
notify: Preinstall | propagate resolvconf to k8s components
|
||||
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
|
||||
Reference in New Issue
Block a user