summaryrefslogtreecommitdiffstats
path: root/roles/ands_idm/tasks/find_connection_by_if.yml
blob: 3fd883ebdccd97141754ab035f9d0db916dcd994 (plain)
1
2
3
4
5
6
7
8
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 }}"