mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-31 14:36:20 -02:30
Replace injected Ansible fact variables in network_plugin role (#13382)
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
service:
|
||||
# noqa: jinja[spacing]
|
||||
name: >-
|
||||
{% if ansible_os_family == "RedHat" -%}
|
||||
{% if ansible_facts['os_family'] == "RedHat" -%}
|
||||
network
|
||||
{%- elif ansible_distribution == "Ubuntu" and ansible_distribution_release == "bionic" -%}
|
||||
{%- elif ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_release'] == "bionic" -%}
|
||||
systemd-networkd
|
||||
{%- elif ansible_os_family == "Debian" -%}
|
||||
{%- elif ansible_facts['os_family'] == "Debian" -%}
|
||||
networking
|
||||
{%- endif %}
|
||||
state: restarted
|
||||
when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and kube_network_plugin not in ['calico']
|
||||
when: not ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and kube_network_plugin not in ['calico']
|
||||
listen: Macvlan | restart network
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
dest: /etc/network/interfaces.d/60-mac0.cfg
|
||||
mode: "0644"
|
||||
notify: Macvlan | restart network
|
||||
when: ansible_os_family in ["Debian"]
|
||||
when: ansible_facts['os_family'] in ["Debian"]
|
||||
|
||||
- name: Install macvlan config on RH distros
|
||||
when: ansible_os_family == "RedHat"
|
||||
when: ansible_facts['os_family'] == "RedHat"
|
||||
block:
|
||||
- name: Macvlan | Install macvlan script on centos
|
||||
copy:
|
||||
@@ -61,7 +61,7 @@
|
||||
notify: Macvlan | restart network
|
||||
|
||||
- name: Install macvlan config on Flatcar
|
||||
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
block:
|
||||
- name: Macvlan | Install service nat via gateway on Flatcar Container Linux
|
||||
template:
|
||||
|
||||
Reference in New Issue
Block a user