proxmox: simplify interface setup tasks
This commit is contained in:
parent
5038411af3
commit
d399fc0a24
|
@ -24,20 +24,6 @@
|
|||
mode: 0644
|
||||
notify: reboot
|
||||
|
||||
- name: Set up loopback interface
|
||||
template:
|
||||
dest: /etc/network/interfaces.d/loopback.intf
|
||||
src: loopback.intf.j2
|
||||
mode: 0644
|
||||
notify: reload interfaces
|
||||
|
||||
- name: Set up fabric interfaces
|
||||
template:
|
||||
dest: /etc/network/interfaces.d/fabric.intf
|
||||
src: fabric.intf.j2
|
||||
mode: 0644
|
||||
notify: reload interfaces
|
||||
|
||||
- name: Set up interfaces
|
||||
template:
|
||||
dest: /etc/network/interfaces
|
||||
|
@ -45,6 +31,16 @@
|
|||
mode: 0644
|
||||
notify: reload interfaces
|
||||
|
||||
- name: Set up fabric and loopback interfaces
|
||||
template:
|
||||
dest: '/etc/network/interfaces.d/{{ item }}'
|
||||
src: '{{ item }}.j2'
|
||||
mode: 0644
|
||||
notify: reload interfaces
|
||||
loop:
|
||||
- fabric.intf
|
||||
- loopback.intf
|
||||
|
||||
- include_tasks: mgmt.yml
|
||||
|
||||
- include_tasks: sdn.yml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% for iface in hostvars[inventory_hostname].interfaces | selectattr('name', 'match', '^lan') %}
|
||||
{% for iface in interfaces | selectattr('name', 'match', '^lan') %}
|
||||
auto {{ iface.name }}
|
||||
iface {{ iface.name }}
|
||||
mtu 9216
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue