From 0694f3649e0591c2307750aa79e7ea9126f32217 Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 27 Oct 2021 16:49:17 +0300 Subject: [PATCH] update --- tasks/RedHat/8.yaml | 10 ++++++++++ tasks/RedHat/network_manager.yaml | 2 ++ 2 files changed, 12 insertions(+) diff --git a/tasks/RedHat/8.yaml b/tasks/RedHat/8.yaml index dac3d35..d73b661 100644 --- a/tasks/RedHat/8.yaml +++ b/tasks/RedHat/8.yaml @@ -9,6 +9,16 @@ when: network.network_scripts is defined +- name: Set blank routes symbol + command: echo -n + register: echo + changed_when: false + +- name: Create array for interfaces to reload + set_fact: + reload_interfaces: [] + changed_when: false + - name: Configure interfaces and routes with nmcli include: network_manager.yaml iface={{ item }} when: network.network_manager is defined diff --git a/tasks/RedHat/network_manager.yaml b/tasks/RedHat/network_manager.yaml index b3bf5b1..79d43c1 100644 --- a/tasks/RedHat/network_manager.yaml +++ b/tasks/RedHat/network_manager.yaml @@ -15,6 +15,8 @@ state: present notify: - Reload interface with nmcli + set_fact: + reload_interfaces: "{{ reload_interfaces + iface.conn_name }}" - name: Get existing ipv4 routes shell: nmcli -g ipv4.routes connection show {{ iface.conn_name }}