Skip to content
Snippets Groups Projects
Unverified Commit a81c6d54 authored by Romain's avatar Romain Committed by GitHub
Browse files

Add a way to configure reseted networking service name. (#10428)

parent 6b34e3ef
No related branches found
No related tags found
No related merge requests found
---
flush_iptables: true
reset_restart_network: true
reset_restart_network_service_name: >-
{% if ansible_os_family == "RedHat" -%}
{%-
if ansible_distribution_major_version | int >= 8
or is_fedora_coreos or ansible_distribution == "Fedora" -%}
NetworkManager
{%- else -%}
network
{%- endif -%}
{%- elif ansible_distribution == "Ubuntu" -%}
systemd-networkd
{%- elif ansible_os_family == "Debian" -%}
networking
{%- endif %}
......@@ -429,19 +429,7 @@
- name: Reset | Restart network
service:
# noqa: jinja[spacing]
name: >-
{% if ansible_os_family == "RedHat" -%}
{%- if ansible_distribution_major_version | int >= 8 or is_fedora_coreos or ansible_distribution == "Fedora" -%}
NetworkManager
{%- else -%}
network
{%- endif -%}
{%- elif ansible_distribution == "Ubuntu" -%}
systemd-networkd
{%- elif ansible_os_family == "Debian" -%}
networking
{%- endif %}
name: "{{ reset_restart_network_service_name }}"
state: restarted
when:
- ansible_os_family not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment