mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-30 22:16:23 -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
|
||||
|
||||
Reference in New Issue
Block a user