Don't do 'nmcli con up' on disabled interfaces
This should avoid us turning on interfaces the config is telling us shouldn't be turned on. Should only affect openQA-related boxes, as those are the only ones that use ansible_ifcfg_disabled at present. It is defined as an empty list in group_vars/all, so we shouldn't need to worry about it not being defined. Also converts from the deprecated with_items syntax to loop syntax. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
47d848fd64
commit
5e5f5fae27
1 changed files with 2 additions and 2 deletions
|
@ -170,8 +170,8 @@
|
|||
command: nmcli con up {{ item.split()[1] }}
|
||||
async: 1
|
||||
poll: 0
|
||||
with_items:
|
||||
- "{{ if_uuid.stdout_lines }}"
|
||||
loop: "{{ if_uuid.stdout_lines|flatten(levels=1) }}"
|
||||
when: item.split()[1] not in ansible_ifcfg_disabled
|
||||
|
||||
- name: flush journald tmpfiles to persistent store
|
||||
command: pkill -f -USR1 systemd-journald
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue