[network-interfaces] PEPCRANSED
parent
289f0c6865
commit
262696970f
|
@ -0,0 +1,30 @@
|
|||
glob_network_interfaces:
|
||||
vlan:
|
||||
- name: srv
|
||||
id: 2
|
||||
gateway: 185.230.79.4 # 185.230.79.62
|
||||
dns: 185.230.79.4 # 185.230.79.62
|
||||
gateway_v6: 2a0c:700:2::ff:fe00:9902
|
||||
- name: srv_nat
|
||||
id: 3
|
||||
gateway: 172.16.3.99
|
||||
dns: 172.16.3.99
|
||||
gateway_v6: 2a0c:700:3::ff:fe00:9903
|
||||
- name: san
|
||||
id: 4
|
||||
- name: adm
|
||||
id: 10
|
||||
dns: 172.16.10.101 172.16.10.102
|
||||
- name: infra
|
||||
id: 11
|
||||
dns: 172.16.32.99
|
||||
- name: adh
|
||||
id: 12
|
||||
gateway: 185.230.78.99
|
||||
dns: 185.230.78.99
|
||||
gateway_v6: 2a0c:700:12::ff:fe00:9912
|
||||
- name: adh_nat
|
||||
id: 13
|
||||
gateway: 100.64.0.99
|
||||
dns: 100.64.0.99
|
||||
gateway_v6: 2a0c:700:13::ff:fe00:9913
|
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: crans_vm,!routeurs_vm
|
||||
vars:
|
||||
vlan:
|
||||
- name: srv
|
||||
id: 2
|
||||
gateway: 185.230.79.4 # 185.230.79.62
|
||||
dns: 185.230.79.4 # 185.230.79.62
|
||||
gateway_v6: 2a0c:700:2::ff:fe00:9902
|
||||
- name: srv_nat
|
||||
id: 3
|
||||
gateway: 172.16.3.99
|
||||
dns: 172.16.3.99
|
||||
gateway_v6: 2a0c:700:3::ff:fe00:9903
|
||||
- name: san
|
||||
id: 4
|
||||
- name: adm
|
||||
id: 10
|
||||
dns: 172.16.10.101 172.16.10.102
|
||||
- name: infra
|
||||
id: 11
|
||||
dns: 172.16.32.99
|
||||
- name: adh
|
||||
id: 12
|
||||
gateway: 185.230.78.99
|
||||
dns: 185.230.78.99
|
||||
gateway_v6: 2a0c:700:12::ff:fe00:9912
|
||||
- name: adh_nat
|
||||
id: 13
|
||||
gateway: 100.64.0.99
|
||||
dns: 100.64.0.99
|
||||
gateway_v6: 2a0c:700:13::ff:fe00:9913
|
||||
roles:
|
||||
- interfaces
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: crans_vm,!routeurs_vm
|
||||
vars:
|
||||
network_interfaces: "{{ glob_network_interfaces | default({}) | combine(loc_network_interfaces | default({})) }}"
|
||||
roles:
|
||||
- network_interfaces
|
|
@ -77,3 +77,4 @@
|
|||
|
||||
- import_playbook: borgbackups_client.yml
|
||||
- import_playbook: monitoring.yml
|
||||
- import_playbook: network_interfaces.yml
|
||||
|
|
|
@ -25,4 +25,4 @@
|
|||
dest: "/etc/network/interfaces.d/{{ '%02d' | format(item.id) }}-{{ item.name | replace('_', '-') }}"
|
||||
mode: 0644
|
||||
when: item.name in interfaces
|
||||
loop: "{{ vlan }}"
|
||||
loop: "{{ network_interfaces.vlan }}"
|
Loading…
Reference in New Issue