-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup-proxmox-host-initial.yml
108 lines (89 loc) · 2.71 KB
/
setup-proxmox-host-initial.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
- name: Ensure ansible and provisioning requirements on proxmox host
hosts: localhost
gather_facts: no
pre_tasks:
- name: 'Install Dependencies'
become: yes
apt:
name:
- python3-pip
- sudo
# - name: 'Pin httplib2<0.16.0 to ensure duplicity works'
# pip:
# executable: /usr/bin/pip2
# name: httplib2
# version: '0.14.0'
# - name: 'Ensure pydrive for duplicity'
# become: yes
# pip:
# executable: /usr/bin/pip2
# name: pydrive
# - name: 'Ensure backups directory'
# become: yes
# file:
# name: '{{ backup.directory }}'
# state: directory
# - name: 'Ensure duplicity'
# become: yes
# apt:
# name: duplicity
# state: latest
# update_cache: yes
vars_files:
- 'vars/secrets.yml'
- 'vars/secrets_mapping.yml'
- 'vars/backups.yml'
roles:
- ansible
- ifupdown2
- packer
- jq # for manipulating the proxmox api pvesh when it was --output-format=json
# TODO(ocanty) - automate me
# tasks:
# - name: Setup /etc/network/interfaces
# copy:
# content: |
# source /etc/network/interfaces.d/*
# auto lo
# iface lo inet loopback
# iface enp6s0 inet manual
# iface enp4s0 inet manual
# iface ens3f0 inet manual
# iface ens3f1 inet manual
# auto vmbr0
# iface vmbr0 inet manual
# bridge-ports enp6s0
# bridge-stp off
# bridge-fd 0
# bridge-vlan-aware yes
# bridge-vids 2-4094
# auto vmbr0.10
# iface vmbr0.10 inet static
# address 10.0.10.53/24
# auto vmbr0.20
# iface vmbr0.20 inet static
# address 10.0.20.53/24
# gateway 10.0.20.1
# auto vmbr0.30
# iface vmbr0.30 inet static
# address 10.0.30.53/24
# auto vmbr0.80
# iface vmbr0.80 inet static
# address 10.0.80.53/24
# auto vmbr0.90
# iface vmbr0.90 inet static
# address 10.0.90.3/24
# auto vmbr0.40
# iface vmbr0.40 inet static
# address 10.0.40.53/24
# - role: packer-provisioning-dhcp-bridge
# vars:
# bridge_inteface: "vmbr1"
# bridge_address: "10.0.100.1"
# bridge_netmask: "24"
# nat_interface: "vmbr0.20"
# dhcp_range_begin: "10.0.100.2"
# dhcp_range_end: "10.0.100.254"
# dhcp_netmask: "255.255.255.0"
# dhcp_lease_length: "24h"
# dhcp_dns_servers: "8.8.8.8,8.8.4.4"