From b23e9400c36acf9856606165489e8828c2cf8dd5 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 11 Oct 2019 06:25:21 +0200 Subject: ipa-client and fine tunning --- roles/ands_idm/tasks/find_connection_by_if.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 roles/ands_idm/tasks/find_connection_by_if.yml (limited to 'roles/ands_idm/tasks/find_connection_by_if.yml') diff --git a/roles/ands_idm/tasks/find_connection_by_if.yml b/roles/ands_idm/tasks/find_connection_by_if.yml new file mode 100644 index 0000000..3fd883e --- /dev/null +++ b/roles/ands_idm/tasks/find_connection_by_if.yml @@ -0,0 +1,9 @@ +- name: "Detect nm connection corresponding to interface '{{ bridge | default(iface) }}'" + shell: "nmcli d show {{ iface | quote }} | grep CONNECTION | cut -d ':' -f 2- | sed -E -e 's/^[[:space:]]+//' | grep '^[[:alpha:]]'" + register: conres + failed_when: false + changed_when: false + +- name: "Set {{ var }} to {{ conres.stdout | quote }}" + set_fact: + "{{ var }}": "{{ conres.stdout }}" -- cgit v1.2.3