File tree Expand file tree Collapse file tree 5 files changed +47
-1
lines changed Expand file tree Collapse file tree 5 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ edgerouter_dhcp_networks :
3+ - name : cycledhcp
4+ subnet : 10.20.0.0/16
5+ static-hosts :
6+ - hostname : earl.noise
7+ ipaddress : 10.20.0.10
8+ mac-address : b8:27:eb:0c:c6:e9
9+ - hostname : enter-ap.noise
10+ ipaddress : 10.20.0.13
11+ mac-address : 80:2a:a8:c0:f7:44
Original file line number Diff line number Diff line change 3131 cloud :
3232 hosts :
3333 cloud.noise : {}
34+ routers :
35+ hosts :
36+ # EdgeRouter ER-4
37+ cycletrailer.noisebridge.net :
38+ ansible_network_os : edgeos
3439
3540# Aliases (production)
3641 noisebridge-net :
Original file line number Diff line number Diff line change 1+ ---
2+ edgerouter_dhcp_subnets :
3+ internal :
4+ subnet : 192.168.0.0/24
5+
6+ edgerouter_static_hosts : {}
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Create DHCP network
3+ edgeos_config :
4+ lines :
5+ - " set system dhcp-server shared-network-name {{ item.name }} subnet {{ item.subnet }}"
6+ connection : network_cli
7+ with_items : " {{ edgerouter_dhcp_networks }}"
8+
9+ - name : Add static hosts
10+ edgeos_config :
11+ lines :
12+ - " set system static-host-mapping host-name {{ item.1.hostname }} inet {{ item.1.ipaddress }}"
13+ - " set service dhcp-server shared-network-name {{ item.0.name }} subnet {{ item.0.subnet }} static-mapping {{ item.1.hostname }} ip-address {{ item.1.ipaddress }}"
14+ - " set service dhcp-server shared-network-name {{ item.0.name }} subnet {{ item.0.subnet }} static-mapping {{ item.1.hostname }} mac-address '{{ item.1.mac-address }}'"
15+ connection : network_cli
16+ with_subelements :
17+ - " {{ edgerouter_dhcp_networks }}"
18+ - static-hosts
Original file line number Diff line number Diff line change 11---
22
33- name : node defaults
4- hosts : all
4+ hosts : all:!routers
55 become : yes
66 become_method : sudo
77 tags : [common]
8282 tags : [cloud]
8383 roles :
8484 - nextcloud-docker
85+
86+ - name : Routers
87+ hosts : routers
88+ tags : [routers]
89+ roles :
90+ - edgerouter
You can’t perform that action at this time.
0 commit comments