Skip to content

Commit

Permalink
Ignore return code when checking if eth1 exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mackdk committed Oct 29, 2024
1 parent 1efab3d commit f6ea49f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/default/network.sls
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ipv6_disable_all:
{% endif %}

{% if grains['osfullname'] in ['SLE Micro', 'openSUSE Leap Micro'] and (grains['osrelease'] != '5.1' and grains['osrelease'] != '5.2') %}
{% set conname2 = salt.cmd.run_stdout('nmcli -g GENERAL.CONNECTION device show eth1') %}
{% set conname2 = salt.cmd.run_stdout('nmcli -g GENERAL.CONNECTION device show eth1', ignore_retcode=true) %}
{% if conname2 != '' %}
enable_dhcp_on_eth1:
cmd.run:
Expand Down

0 comments on commit f6ea49f

Please sign in to comment.