forked from dresden-weekly/ansible-network-interfaces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
84 lines (70 loc) · 2.13 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
# Flag whether all network devices are controlled by this role
#
# If true, all additional scripts are deleted
network_manage_devices: yes
# Allow the network to restart
#
# This is only triggered, when the all interface file was changed
network_allow_service_restart: yes
# How should changed interfaces be treated?
#
# Options:
# service - restart the network service for the interface
# interface - down & up the interface
# nothing - do nothing
# * - undefined behavior
network_restart_method: service
# List of all network interface configurations
#
# For ipv6 you want to add an additional inet6 entry
network_interfaces:
- device: eth0
# auto & allow are only used for the first device entry
auto: true # enable on boot (default)
allow: [] # array of allow-[stanzas] eg. allow-hotplug
family: inet # network type eg. inet | inet6 (default)
method: dhcp # dhcp | static (default)
# examples for method 'static'
#description: 'a user description'
#address: 192.168.1.11
#network: 192.168.1.0
#netmask: 193.168.1.255
#broadcast: 192.168.1.255
#gateway: 192.168.1.1
# transport
#mtu: 9000 # give a non-default mtu
# ifmetric
#metric: 10
# optional dns settings
#nameservers: ['8.8.8.8']
#dns_search: "domain.net" # appended dns search string
# optional additional subnets/ips
#subnets: ['192.168.123.0/24', '192.168.124.11/32']
bridge: {} # optional bridge parameters
# ports:
# stp:
# fd:
# maxwait:
# waitport:
bond: {} # optional bonding parameters
# mode:
# miimon:
# master:
# slaves:
# lacp-rate:
# optional vlan settings
vlan: {}
# raw-device: 'eth0'
# inline hook scripts
pre-up: [] # pre-up script lines
up: [] # up script lines
post-up: [] # post-up script lines (alias for up)
pre-down: [] # pre-down script lines (alias for down)
down: [] # down script lines
post-down: [] # post-down script lines
network_all_interfaces_path: "/etc/network/interfaces"
network_interface_path: "/etc/network/interfaces.d"
network_interface_permissions: 0644
network_interface_restart_commands:
interface: "ifdown {{ item.item.0 }}; ifup {{ item.item.0 }}"