Compare commits
4 commits
master
...
sig-neuer-
Author | SHA1 | Date | |
---|---|---|---|
a12729ba3b | |||
45ffd0e23c | |||
5432c8b2b5 | |||
77cc80f798 |
5 changed files with 136 additions and 0 deletions
78
host-vyos.yml
Normal file
78
host-vyos.yml
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
---
|
||||||
|
- hosts: vyos.n39.eu
|
||||||
|
become: true
|
||||||
|
|
||||||
|
vars:
|
||||||
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
|
|
||||||
|
roles:
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: Configure a DHCP Server
|
||||||
|
vyos.vyos.vyos_config:
|
||||||
|
lines:
|
||||||
|
- set system option keyboard-layout 'de'
|
||||||
|
|
||||||
|
- name: Replace provided configuration with device configuration
|
||||||
|
vyos.vyos.vyos_interfaces:
|
||||||
|
config:
|
||||||
|
- name: eth0
|
||||||
|
description: Trunk
|
||||||
|
vifs:
|
||||||
|
- vlan_id: 1
|
||||||
|
description: VIF 1 - mgmt
|
||||||
|
- vlan_id: 4
|
||||||
|
description: VIF 4 - user
|
||||||
|
- vlan_id: 7
|
||||||
|
description: VIF 7 - telekom pppoe
|
||||||
|
- vlan_id: 9
|
||||||
|
description: VIF 9 - dmz
|
||||||
|
- vlan_id: 71
|
||||||
|
description: VIF 71 - telekom status
|
||||||
|
- vlan_id: 100
|
||||||
|
description: VIF 100 - RAW Internet
|
||||||
|
state: replaced
|
||||||
|
|
||||||
|
- name: Merge provided configuration with device configuration
|
||||||
|
vyos.vyos.vyos_l3_interfaces:
|
||||||
|
config:
|
||||||
|
- name: eth0.1
|
||||||
|
ipv4:
|
||||||
|
- address: 172.23.63.2/24
|
||||||
|
- name: eth0.4
|
||||||
|
ipv4:
|
||||||
|
- address: 172.23.48.4/22
|
||||||
|
- name: eth0.9
|
||||||
|
ipv4:
|
||||||
|
- address: 172.23.52.2/22
|
||||||
|
- name: eth0.71
|
||||||
|
ipv4:
|
||||||
|
- address: 192.168.100.3/24
|
||||||
|
- name: eth0.100
|
||||||
|
ipv4:
|
||||||
|
- address: 192.168.39.1/24
|
||||||
|
state: replaced
|
||||||
|
|
||||||
|
- name: Configure a DHCP Server
|
||||||
|
vyos.vyos.vyos_config:
|
||||||
|
lines:
|
||||||
|
- set service dhcp-server disabled 'false'
|
||||||
|
- set service dhcp-server shared-network-name Client subnet 172.23.63.0/24 default-router '172.23.63.2'
|
||||||
|
- set service dhcp-server shared-network-name Client subnet 172.23.48.0/22 default-router '172.23.48.4' start '172.23.48.150' stop '172.23.51.250'
|
||||||
|
- set service dhcp-server shared-network-name Client subnet 172.23.52.0/22 default-router '172.23.52.2' start '172.23.53.0' stop '172.23.53.255'
|
||||||
|
- set service dhcp-server shared-network-name Client subnet 192.168.39.0/24 default-router '192.168.39.1'
|
||||||
|
save: yes
|
||||||
|
|
||||||
|
- name: And a DNS forwarder
|
||||||
|
vyos.vyos.vyos_config:
|
||||||
|
lines:
|
||||||
|
- set system static-host-mapping host-name ipv6.host.domain.loc inet xxxx:xxxx:xxxx:xxxx::x
|
||||||
|
- set system static-host-mapping host-name ipv6.host.domain.loc alias host.domain.loc
|
||||||
|
save: yes
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- name: restart
|
||||||
|
vyos.vyos.command:
|
||||||
|
commands:
|
||||||
|
- restart
|
44
host_vars/vyos.n39.eu/dns-dhcp.yml
Normal file
44
host_vars/vyos.n39.eu/dns-dhcp.yml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
entries:
|
||||||
|
- hostname: sw-1
|
||||||
|
mac: 00:0f:cb:ed:5e:e0
|
||||||
|
address: 172.23.63.34
|
||||||
|
# aliases:
|
||||||
|
# - name:
|
||||||
|
- hostname: sw-4
|
||||||
|
mac: 00:1e:8c:74:79:62
|
||||||
|
address: 172.23.63.35
|
||||||
|
aliases:
|
||||||
|
- name: gx-2124x.n39.eu
|
||||||
|
- hostname: beaker-mgmt
|
||||||
|
mac: 00:19:99:ec:07:5d
|
||||||
|
address: 172.23.63.43
|
||||||
|
- hostname: sw-2.n39.eu
|
||||||
|
mac: 10:0d:7f:4a:c0:21
|
||||||
|
address: 172.23.63.94
|
||||||
|
aliases:
|
||||||
|
- name: gs108tv2-1.n39.eu
|
||||||
|
- hostname: sw-3.n39.eu
|
||||||
|
mac: 20:0c:c8:4e:2c:56
|
||||||
|
address: 172.23.63.104
|
||||||
|
aliases:
|
||||||
|
- name: gs105pe-1.n39.eu
|
||||||
|
- hostname: pottwal.n39.eu
|
||||||
|
mac: 52:82:de:fc:1e:94
|
||||||
|
address: 172.23.52.44
|
||||||
|
aliases:
|
||||||
|
- name: apt-proxy.n39.eu
|
||||||
|
- name: label.n39.eu
|
||||||
|
- name: syslog.n39.eu
|
||||||
|
- name: pad.n39.eu
|
||||||
|
- name: git.n39.eu
|
||||||
|
- name: uritools.n39.eu
|
||||||
|
- name: uritools-api.n39.eu
|
||||||
|
- name: uptime.n39.eu
|
||||||
|
- name: redmine.n39.eu
|
||||||
|
- name: influx.n39.eu
|
||||||
|
- name: jabber.n39.eu
|
||||||
|
- name: conference.jabber.n39.eu
|
||||||
|
- name: grafana.n39.eu
|
||||||
|
- name: inventory.n39.eu
|
||||||
|
- name: sl.n39.eu
|
||||||
|
- name: spaceapi.n39.eu
|
6
host_vars/vyos.n39.eu/vars.yml
Normal file
6
host_vars/vyos.n39.eu/vars.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
ansible_user: vyos
|
||||||
|
ansible_connection: ansible.netcommon.network_cli
|
||||||
|
ansible_network_os: vyos
|
||||||
|
vyos_user: "vyos"
|
||||||
|
vyos_password: "${{ vault_vyos_password }}"
|
6
host_vars/vyos.n39.eu/vault
Normal file
6
host_vars/vyos.n39.eu/vault
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
61653838316339323134626339363035316239326637346534623263343732393865396538323063
|
||||||
|
6538373236396131653532633134333035376666383262640a343961313831326634393166653539
|
||||||
|
36376634353437346230323037656364636235336530396661653739626432373938646634663065
|
||||||
|
6466363965396130650a376339356330313763383936326662663361366535306463333934356238
|
||||||
|
37623336363637383233323966386231333437343435386462323532366461663364
|
|
@ -18,6 +18,7 @@ all:
|
||||||
k3s-w1.n39.eu:
|
k3s-w1.n39.eu:
|
||||||
k3s-w2.n39.eu:
|
k3s-w2.n39.eu:
|
||||||
k3s-w3.n39.eu:
|
k3s-w3.n39.eu:
|
||||||
|
# vyos.n39.eu:
|
||||||
|
|
||||||
children:
|
children:
|
||||||
docker_host:
|
docker_host:
|
||||||
|
@ -61,6 +62,7 @@ all:
|
||||||
k3s-w1.n39.eu:
|
k3s-w1.n39.eu:
|
||||||
k3s-w2.n39.eu:
|
k3s-w2.n39.eu:
|
||||||
k3s-w3.n39.eu:
|
k3s-w3.n39.eu:
|
||||||
|
rousseau.n39.eu:
|
||||||
location_internet:
|
location_internet:
|
||||||
hosts:
|
hosts:
|
||||||
tau.netz39.de:
|
tau.netz39.de:
|
||||||
|
|
Loading…
Reference in a new issue