diff options
-rw-r--r-- | chaos-at-home/host_vars/r3-cccamp19-sw0.yml | 9 | ||||
-rw-r--r-- | chaos-at-home/r3-cccamp19-sw0.yml | 8 | ||||
-rw-r--r-- | inventory/group_vars/realraum/network.yml | 20 | ||||
-rw-r--r-- | inventory/host_vars/r3-cccamp19-sw0.yml | 23 | ||||
-rw-r--r-- | inventory/hosts.ini | 4 | ||||
-rw-r--r-- | roles/dellos6/bootstrap/tasks/main.yml | 6 | ||||
-rw-r--r-- | roles/dellos6/bootstrap/templates/init.j2 | 2 |
7 files changed, 71 insertions, 1 deletions
diff --git a/chaos-at-home/host_vars/r3-cccamp19-sw0.yml b/chaos-at-home/host_vars/r3-cccamp19-sw0.yml new file mode 100644 index 00000000..9a0e7782 --- /dev/null +++ b/chaos-at-home/host_vars/r3-cccamp19-sw0.yml @@ -0,0 +1,9 @@ +$ANSIBLE_VAULT;1.2;AES256;chaos-at-home +36323334643335666630393439363962363665633161333563336237376532303137336431336665 +3430313039653331633563393033393637633164616462310a366162373163353561363864306465 +30343433653738663735383532336535396231613162303232656139663562633238383765666233 +3434616261623131310a343236333230363866666331663665373566383938383136316536323435 +62313238303564666230393333353630326464316631376238366635616238613232366466383035 +63636562616437356432323731613632653636363031643165666339633363353934633262643466 +64363839343230393863643532613365393033333731653830363061663135663533636332353162 +36336233376561613338 diff --git a/chaos-at-home/r3-cccamp19-sw0.yml b/chaos-at-home/r3-cccamp19-sw0.yml new file mode 100644 index 00000000..1fbeb452 --- /dev/null +++ b/chaos-at-home/r3-cccamp19-sw0.yml @@ -0,0 +1,8 @@ +--- +- name: bootstrap + hosts: r3-cccamp19-sw0 + gather_facts: no + roles: + - dellos6/bootstrap + - dellos6/base + - dellos6/layer2 diff --git a/inventory/group_vars/realraum/network.yml b/inventory/group_vars/realraum/network.yml new file mode 100644 index 00000000..9cb753e7 --- /dev/null +++ b/inventory/group_vars/realraum/network.yml @@ -0,0 +1,20 @@ +--- +network_zones: + cccamp19: + vlan: 19 + + protected: + vlan: 126 + prefix: 192.168.126.0/24 + offsets: + r3-cccamp19-gw: 254 + dhcp: + start: 1 + limit: 199 + + mgmt: + vlan: 41 + prefix: 192.168.41.0/24 + offsets: + r3-cccamp19-sw0: 200 + r3-cccamp19-gw: 254 diff --git a/inventory/host_vars/r3-cccamp19-sw0.yml b/inventory/host_vars/r3-cccamp19-sw0.yml new file mode 100644 index 00000000..5b01d940 --- /dev/null +++ b/inventory/host_vars/r3-cccamp19-sw0.yml @@ -0,0 +1,23 @@ +--- +switch_mgmt_zone: "{{ network_zones.mgmt }}" +switch_mgmt_interface: "Gi1/0/28" + +switch_vlans: "{{ switch_vlans_yaml | from_yaml }}" +switch_vlans_yaml: | + {% for zone_name in network_zones.keys() %} + - name: "{{ zone_name }}" + id: "{{ network_zones[zone_name].vlan }}" + {% endfor %} + +switch_interfaces: "{{ switch_interfaces_yaml | from_yaml }}" +switch_interfaces_yaml: | + - spec: range Te1/0/1-4 + vlan: {{ network_zones['cccamp19'].vlan }} + - spec: range Gi1/0/5-16 + vlan: {{ network_zones['cccamp19'].vlan }} + + - spec: range Gi1/0/17-24 + vlan: {{ network_zones['protected'].vlan }} + + - spec: range Gi1/0/25-28 + vlan: {{ network_zones['mgmt'].vlan }} diff --git a/inventory/hosts.ini b/inventory/hosts.ini index bdc7c57b..b14e833f 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -56,6 +56,7 @@ ansible_port=22000 [realraum] r3-vex2 host_name=vex2 +r3-cccamp19-sw0 ansible_host=192.168.41.200 ansible_port=22 ############################### @@ -151,6 +152,9 @@ ele_infobeamer ############################### # host categories +[dellos6] +r3-cccamp19-sw0 + [dellos6:children] chaos_at_home_switches diff --git a/roles/dellos6/bootstrap/tasks/main.yml b/roles/dellos6/bootstrap/tasks/main.yml index 552aeddd..1c9fdc5e 100644 --- a/roles/dellos6/bootstrap/tasks/main.yml +++ b/roles/dellos6/bootstrap/tasks/main.yml @@ -1,4 +1,10 @@ --- +- name: only one ssh key for root? + delegate_to: localhost + when: (ssh_keys_root | length) > 1 + fail: + msg: "users may have at the most one ssh-key" + - name: generate initial configuration delegate_to: localhost pause: diff --git a/roles/dellos6/bootstrap/templates/init.j2 b/roles/dellos6/bootstrap/templates/init.j2 index 08e4310a..42623fec 100644 --- a/roles/dellos6/bootstrap/templates/init.j2 +++ b/roles/dellos6/bootstrap/templates/init.j2 @@ -4,7 +4,7 @@ configure no ip domain-lookup hostname {{ host_name }} -vlan 42 +vlan {{ dellos6_mgmt_vlan }} name mgmt exit {% if dellos6_mgmt_interface is defined and dellos6_mgmt_interface != '' %} |