network: Fix adding mac address to network config
This commit is contained in:
parent
b1ba9df17d
commit
da8e519f7c
1 changed files with 2 additions and 2 deletions
|
@ -8,8 +8,8 @@ UUID="{{ line.split()[1] }}"
|
|||
{% endfor %}
|
||||
{% if item.mac is defined %}
|
||||
HWADDR="{{ item.mac }}"
|
||||
{% elif lookup('vars', 'ansible_' + item.device, default=undefined) is undefined %}
|
||||
HWADDR="{{ lookup('vars', 'ansible_' + item.device + '["macaddress"]') }}
|
||||
{% elif ansible_facts[item.device]['macaddress'] is defined %}
|
||||
HWADDR="{{ ansible_facts[item.device]['macaddress'] }}"
|
||||
{% endif %}
|
||||
ONBOOT=yes
|
||||
{% if item.proto is not defined or item.proto == 'dhcp' %}
|
||||
|
|
Loading…
Add table
Reference in a new issue