-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.yml
More file actions
111 lines (99 loc) · 2.48 KB
/
default.yml
File metadata and controls
111 lines (99 loc) · 2.48 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
#TODO move basics to task that requires them
- name: apply basic configuration to all nodes
hosts: all
remote_user: root
roles:
- deploy
- basics
handlers:
- include: roles/docker/handlers/main.yml
- name: configure hdd spindown
hosts: metal
remote_user: root
roles:
- geerlingguy.hdparm
vars:
- hdparm_manage_config: true
- hdparm_devices:
- dev: /dev/sdb
options:
- "spindown_time = 120"
- dev: /dev/sdc
options:
- "spindown_time = 120"
- name: configure and deploy libvirt
hosts: metal
remote_user: root
roles:
- hypervisor
#TODO create vlan bridge interface within /etc/network/interfaces and connect the net to it
#auto dev
#iface dev inet manual
# bridge_ports eth0.2
# bridge_stp off
# bridge_maxwait 0
# bridge_fd 0
# [WARNING]: It is unnecessary to use '{{' in loops, leave variables in loop expressions bare.
#ERROR: [DEPRECATED]: include + with_items is a removed deprecated feature (in /etc/ansible/roles/dresden-weekly.network-interfaces/handlers/main.yml). Please update your playbooks.
#TODO https://github.com/dresden-weekly/ansible-network-interfaces/issues/61
- name: create VLANs and network interfaces
hosts: metal
remote_user: root
vars:
envs:
- dev
- qa
- prod
#nic: enp0s31f6
roles:
- role: dresden-weekly.network-interfaces
network_manage_devices: yes
network_interfaces:
- device: enp0s31f6
description: physical NIC
method: manual
#VLAN interfaces using physical NIC as trunk
- device: vlan3
method: manual
vlan:
raw-device: enp0s31f6
- device: vlan4
method: manual
vlan:
raw-device: enp0s31f6
#last interface to set up. After all call dhclient manual :-(
- device: vlan5
method: manual
vlan:
raw-device: enp0s31f6
up:
- dhclient prod
#networks to attach VMs
- device: dev
method: manual
bridge:
ports: vlan3
stp: off
maxwait: 0
fd: 0
- device: qa
method: manual
bridge:
ports: vlan4
stp: off
maxwait: 0
fd: 0
- device: prod
method: manual
bridge:
ports: vlan5
stp: off
maxwait: 0
fd: 0
- name: set up VM
hosts: vm
remote_user: root
roles:
- vms-guest
- docker