diff --git a/roles/1-prep/tasks/detected_redhat.yml b/roles/1-prep/tasks/detected_redhat.yml index 031a0c030..509339f0b 100644 --- a/roles/1-prep/tasks/detected_redhat.yml +++ b/roles/1-prep/tasks/detected_redhat.yml @@ -44,7 +44,7 @@ - name: Set has ifcfg gw based on on macaddress if found set_fact: has_ifcfg_gw: "{{ ifcfg_gw_mac.stdout|trim }}" - when: ifcfg_gw_mac.changed and ifcfg_gw_mac.stdout != "" + when: ifcfg_gw_mac is defined and ifcfg_gw_mac.changed and ifcfg_gw_mac.stdout != "" # could use something else - name: Find wifi gateway config if present - Can Fail