forked from UCCNetsoc/NaC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-vyos-router.yml
50 lines (48 loc) · 1.27 KB
/
create-vyos-router.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
---
- name: "Ensure Router"
hosts: lovelace
roles:
- role: proxmox-infra-cloudinit-vm
vars:
vm:
name: "vyos-router"
clone: "netsoc-vyos-router-{{ inventory_hostname }}"
protection: no
timeout: 300
description: |
groups:
- vm
- vyos-router
vars:
ansible_user: vyos
ansible_connection: network_cli
ansible_network_os: vyos
ansible_become: yes
ansible_become_method: enable
net:
net0: "virtio,bridge=vmbr1"
cores: 2
memory: 2048
cloudinit:
metadata: |
local-hostname: vyos-router.netsoc.co
networkconfig: |
version: 2
ethernets:
eth0:
match:
name: eth0
addresses:
- 10.0.100.178/24
gateway4: 10.0.100.1
nameservers:
search: ["ipa.netsoc.co"]
addresses: [1.1.1.1, 8.8.8.8]
vars_files:
- vars/proxmox.yml
- vars/secrets.yml
- name: "Reload inventory to pull new VMs"
hosts: 127.0.0.1
connection: local
tasks:
- meta: refresh_inventory