From bc4b673644ed85e71a9a6f2bd6090aec2eb2d050 Mon Sep 17 00:00:00 2001 From: Aleksandr Malyavin Date: Sat, 12 Oct 2024 20:02:58 +0300 Subject: [PATCH] ff --- roles/configure/tasks/main.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/roles/configure/tasks/main.yaml b/roles/configure/tasks/main.yaml index 9736c3e..30bc7cf 100644 --- a/roles/configure/tasks/main.yaml +++ b/roles/configure/tasks/main.yaml @@ -103,22 +103,14 @@ nmcli_failed: "{{ nmcli_result.rc != 0 }}" - name: Run nmcli to check if Ethernet connection has already been added - shell: /usr/bin/nmcli c | grep 'Ethernet-{{ int_name }}' - set_fact: - "nmcli_result_eth_{{ int_name }}" + shell: /usr/bin/nmcli c | grep 'Ethernet' + register: nmcli_result_eth ignore_errors: True - loop: "{{ phy_ints }}" - loop_control: - loop_var: int_name - tags: check - name: Check result nmcli eth set_fact: - "nmcli_eth_failed_{{ int_name }}: {{ nmcli_result_eth-{{ int_name }}.rc != 0 }}" - loop: "{{ nmcli_result_eth }}" - loop_control: - loop_var: int_name - tags: check + nmcli_eth_failed: "{{ nmcli_result_eth.rc != 0 }}" + - name: Run nmcli to check if Ethernet connection has already been added shell: /usr/bin/nmcli c | grep 'LTE' register: nmcli_result_lte