23 lines
942 B
YAML
23 lines
942 B
YAML
# test file for network-interfaces
|
|
---
|
|
- hosts: all
|
|
remote_user: vagrant
|
|
become: true
|
|
roles:
|
|
- ../../
|
|
vars:
|
|
network_interfaces_manage_devices: true
|
|
network_interfaces_interfaces:
|
|
- device: "{{ hostvars[inventory_hostname]['ansible_' + (ansible_interfaces | difference(['lo']) | sort | list | first)]['device'] }}"
|
|
auto: true
|
|
family: inet
|
|
method: dhcp
|
|
pre-up:
|
|
- 'sleep 2'
|
|
- device: "{{ hostvars[inventory_hostname]['ansible_' + (ansible_interfaces | difference(['lo']) | sort | list | last)]['device'] }}"
|
|
auto: true
|
|
family: inet
|
|
method: static
|
|
address: "{{ hostvars[inventory_hostname]['ansible_' + (ansible_interfaces | difference(['lo']) | sort | list | last)]['ipv4']['address'] }}"
|
|
netmask: "{{ hostvars[inventory_hostname]['ansible_' + (ansible_interfaces | difference(['lo']) | sort | list | last)]['ipv4']['netmask'] }}"
|