Commit 2de30fdd authored by julian.gethmann's avatar julian.gethmann

Fix template and add networking.yml

parent c3ace3cb
---
- name: Install ifcfg-LAN
become: yes
template:
src: LAN.j2
dest: /etc/sysconfig/network-scripts/ifcfg-LAN
backup: yes
notify:
- reload nm
- restart network
# {{ ansible_managed }}
# https://developer.gnome.org/NetworkManager/stable/nm-settings-ifcfg-rh.html
#
{% for interface in ansible_interfaces %}
{% if interface.startswith('en') and interface not ansible_defaul_ipv6.interface and interface not ansible_defaul_ipv4.interface %}
{% if (interface.startswith('en') and (interface not in [ansible_default_ipv6.interface, ansible_default_ipv4.interface])) %}
DEVICE={{ interface }}
## HWADDR={{ lookup('vars', 'ansible_' + interface + '.macaddress' }}
HWADDR={{ lookup('vars', 'ansible_' + interface).macaddress }}
{% endif %}
{% endfor %}
AUTOCONNECT_PRIORITY=-500
BOOTPROTO=none
BROWSER_ONLY=no
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment