1
- :o: pass:normal[+[{nbsp}]+]
2
- :x: pass:normal[+[✓]+]
3
-
4
1
Ansible network interface configuration
5
2
=======================================
3
+ [ ![ Ansible Galaxy] ( https://img.shields.io/badge/Ansible%20Galaxy-dresden--weekly.network--interfaces-blue.svg )] ( https://galaxy.ansible.com/list#/roles/2766 )
6
4
7
5
This is an Ansible role that manages network interface configuration as it is found on Debian/Ubuntu servers
8
6
21
19
Example Playbook
22
20
----------------
23
21
24
- [source,yml]
25
- ----
22
+ ``` yml
26
23
- hosts : all
27
- sudo : true
28
- sudo_user : root
24
+ become : true
25
+ become_user : root
29
26
30
27
roles :
31
28
- role : dresden-weekly.network-interfaces
32
29
network_manage_devices : yes
30
+
33
31
network_interfaces :
34
32
- device : eth0
33
+ description : just a description for humans to understand
35
34
auto : true
36
35
family : inet
37
36
method : static
@@ -44,28 +43,75 @@ Example Playbook
44
43
- 8.8.4.4
45
44
subnets :
46
45
- 192.168.1.12/32
46
+
47
47
- device : eth1
48
+ description : simple dhcp client interface
48
49
auto : true
49
50
family : inet
50
51
method : dhcp
51
- ----
52
+
53
+ - device : vlan123
54
+ description : sample vlan interface using eth0 and tagged for VLAN 123.
55
+ method : static
56
+ address : 1.2.3.4
57
+ netmask : 24
58
+ broadcast : 1.2.3.255
59
+ vlan :
60
+ raw-device : eth0
61
+ up :
62
+ - route add default gw 1.2.3.254
63
+
64
+ - device : eth2
65
+ description : First bonding device
66
+ auto : true
67
+ family : inet
68
+ method : manual
69
+ bond :
70
+ master : bond0
71
+
72
+ - device : bond0
73
+ description : This bonding device only has one interface
74
+ allow :
75
+ - hotplug
76
+ family : inet
77
+ method : static
78
+ bond :
79
+ mode : active-backup
80
+ miimon : 100
81
+ slaves : eth2
82
+ address : 192.160.50.1
83
+ netmask : 255.255.255.0
84
+ dns_search : " localdomain"
85
+ up :
86
+ - ip route add 172.16.0.0/24 via 192.168.50.254 dev bond0
87
+ ` ` `
52
88
53
89
Changelog
54
90
---------
55
91
56
- **0.2** *TODO*
92
+ **1.1** (*TODO*)
93
+
94
+ * [ ] open for your ideas, fixes and pull requests
95
+
96
+ **1.0** (Ansible 2 release) 30.03.2016
57
97
58
- * {o} open for your ideas, fixes and pull requests
98
+ * [✓] compatible with Ansible 2.x
99
+ * [✓] support all hook aliases
100
+ * [✓] support for all allow stanzas
101
+ * [✓] full device restart control
102
+ * [✓] improved support for bonding
103
+ * [✓] one config file per device
59
104
60
105
**0.1** (first release) 01.02.2015
61
106
62
- * {x} ipv6 & ipv4 support
63
- * {x} support for multiple network devices
64
- * {x} dhcp and static configuration
65
- * {x} support for bridges
66
- * {x} additional subnets and ips
67
- * {x} custom hook scripts
68
- * {x} remove old interfaces
107
+ * [✓] ipv6 & ipv4 support
108
+ * [✓] support for multiple network devices
109
+ * [✓] dhcp and static configuration
110
+ * [✓] support for bridges
111
+ * [✓] support for bonding
112
+ * [✓] additional subnets and ips
113
+ * [✓] custom hook scripts
114
+ * [✓] remove old interfaces
69
115
70
116
License
71
117
-------
0 commit comments