forked from mrlesmithjr/ansible-config-interfaces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
77 lines (77 loc) · 1.99 KB
/
playbook.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
---
- hosts: test-nodes
vars:
config_network_bonds: true
config_network_bridges: true
config_network_interfaces: true
enable_configured_interfaces_after_defining: true
network_bonds:
- name: 'bond0'
address: '192.168.1.10'
netmask: '255.255.255.0'
configure: true
comment: 'Bond Group 0'
method: 'static'
parameters:
- param: 'miimon'
val: '100'
- param: 'mode'
val: 'active-backup'
- param: 'primary'
val: 'enp0s9'
slaves:
- 'enp0s9'
- 'enp0s10'
primary: 'enp0s9'
addl_settings:
- 'bond_mode active-backup'
- 'bond_miimon 100'
network_bridges:
- name: 'br0'
configure: true
comment: 'Bridge 0'
method: 'static'
address: '192.168.1.11'
netmask: '255.255.255.0'
netmask_cidr: '24'
# gateway: '192.168.1.1'
ports:
- 'enp0s16'
addl_settings:
# - 'up route add default gw 10.0.106.1'
- 'bridge_stp off'
- 'bridge_fd 0'
network_interfaces:
- name: 'enp0s3'
configure: true
method: 'dhcp'
addl_settings:
- 'pre-up sleep 2'
- name: 'enp0s8'
configure: true
method: 'static'
address: '192.168.250.10'
netmask: '255.255.255.0'
- name: 'enp0s9'
configure: true
comment: 'bond0 member'
method: 'manual'
addl_settings:
- 'bond_master bond0'
- name: 'enp0s10'
configure: true
comment: 'bond0 member'
method: 'manual'
addl_settings:
- 'bond_master bond0'
- name: 'enp0s16'
configure: true
comment: 'br0 member'
method: 'manual'
addl_settings:
- 'bond_master bond0'
pri_domain_name: 'test.vagrant.local'
roles:
- role: ansible-openvswitch
- role: ansible-config-interfaces
tasks: