zwischenstand
This commit is contained in:
parent
5432c8b2b5
commit
45ffd0e23c
6 changed files with 69 additions and 19 deletions
|
@ -1,16 +0,0 @@
|
|||
---
|
||||
- hosts: rousseau.n39.eu
|
||||
become: true
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
||||
roles:
|
||||
|
||||
tasks:
|
||||
|
||||
- name: debug
|
||||
ansible.builtin.debug:
|
||||
msg: hello rousseau
|
||||
|
||||
handlers:
|
61
host-vyos.yml
Normal file
61
host-vyos.yml
Normal file
|
@ -0,0 +1,61 @@
|
|||
---
|
||||
- hosts: vyos.n39.eu
|
||||
become: true
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
||||
roles:
|
||||
|
||||
tasks:
|
||||
- name: Replace provided configuration with device configuration
|
||||
vyos.vyos.vyos_interfaces:
|
||||
config:
|
||||
- name: eth0
|
||||
description: VLAN04 - Client Netz
|
||||
- name: eth1
|
||||
description: VLAN07 - Telekom Modem
|
||||
- name: eth2
|
||||
description: VLAN09 - DMZ
|
||||
- name: eth3
|
||||
description: VLAN71 - Telekom Status
|
||||
- name: eth4
|
||||
description: VLAN100 - RAW Internet
|
||||
state: replaced
|
||||
|
||||
- name: Merge provided configuration with device configuration
|
||||
vyos.vyos.vyos_l3_interfaces:
|
||||
config:
|
||||
- name: eth0
|
||||
ipv4:
|
||||
- address: 172.23.48.2/22
|
||||
- name: eth2
|
||||
ipv4:
|
||||
- address: 172.23.52.2/22
|
||||
- name: eth3
|
||||
ipv4:
|
||||
- address: 192.168.100.3/24
|
||||
- name: eth4
|
||||
ipv4:
|
||||
- address: 192.168.39.1/24
|
||||
|
||||
- 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.48.0/22 default-router '172.23.48.2' 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
|
||||
save: yes
|
||||
|
||||
handlers:
|
||||
- name: restart
|
||||
vyos.vyos.command:
|
||||
commands:
|
||||
- restart
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
vyos_user: "vyos"
|
||||
vyos_password: "${{ vault_vyos_password }}"
|
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 }}"
|
|
@ -18,6 +18,7 @@ all:
|
|||
k3s-w1.n39.eu:
|
||||
k3s-w2.n39.eu:
|
||||
k3s-w3.n39.eu:
|
||||
# vyos.n39.eu:
|
||||
|
||||
children:
|
||||
docker_host:
|
||||
|
@ -61,6 +62,7 @@ all:
|
|||
k3s-w1.n39.eu:
|
||||
k3s-w2.n39.eu:
|
||||
k3s-w3.n39.eu:
|
||||
rousseau.n39.eu:
|
||||
location_internet:
|
||||
hosts:
|
||||
tau.netz39.de:
|
||||
|
|
Loading…
Reference in a new issue