From 301e6e0c861379284508209b36a6c8b23ab62f54 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 21 Jun 2020 20:56:13 +0200 Subject: move r3-cccamp19 stuff to _graveyard_, introduce new kvm groups --- .../chaos-at-home/host_vars/r3-cccamp19-sw0.yml | 9 +++++ _graveyard_/chaos-at-home/r3-cccamp19-gw.yml | 5 +++ _graveyard_/chaos-at-home/r3-cccamp19-sw0.yml | 8 +++++ _graveyard_/chaos-at-home/r3-cccamp19_vm.yml | 9 +++++ _graveyard_/chaos-at-home/r3-vex2.yml | 7 ++++ .../inventory/group_vars/r3-cccamp19/network.yml | 33 +++++++++++++++++++ _graveyard_/inventory/host_vars/r3-cccamp19-av.yml | 38 ++++++++++++++++++++++ .../inventory/host_vars/r3-cccamp19-dione.yml | 18 ++++++++++ .../inventory/host_vars/r3-cccamp19-feedcode.yml | 33 +++++++++++++++++++ .../inventory/host_vars/r3-cccamp19-flora.yml | 38 ++++++++++++++++++++++ _graveyard_/inventory/host_vars/r3-cccamp19-gw.yml | 3 ++ .../inventory/host_vars/r3-cccamp19-helene.yml | 18 ++++++++++ .../inventory/host_vars/r3-cccamp19-sw0.yml | 23 +++++++++++++ .../inventory/host_vars/r3-cccamp19-verr.yml | 38 ++++++++++++++++++++++ _graveyard_/inventory/hosts.ini | 36 ++++++++++++++++++++ 15 files changed, 316 insertions(+) create mode 100644 _graveyard_/chaos-at-home/host_vars/r3-cccamp19-sw0.yml create mode 100644 _graveyard_/chaos-at-home/r3-cccamp19-gw.yml create mode 100644 _graveyard_/chaos-at-home/r3-cccamp19-sw0.yml create mode 100644 _graveyard_/chaos-at-home/r3-cccamp19_vm.yml create mode 100644 _graveyard_/chaos-at-home/r3-vex2.yml create mode 100644 _graveyard_/inventory/group_vars/r3-cccamp19/network.yml create mode 100644 _graveyard_/inventory/host_vars/r3-cccamp19-av.yml create mode 100644 _graveyard_/inventory/host_vars/r3-cccamp19-dione.yml create mode 100644 _graveyard_/inventory/host_vars/r3-cccamp19-feedcode.yml create mode 100644 _graveyard_/inventory/host_vars/r3-cccamp19-flora.yml create mode 100644 _graveyard_/inventory/host_vars/r3-cccamp19-gw.yml create mode 100644 _graveyard_/inventory/host_vars/r3-cccamp19-helene.yml create mode 100644 _graveyard_/inventory/host_vars/r3-cccamp19-sw0.yml create mode 100644 _graveyard_/inventory/host_vars/r3-cccamp19-verr.yml create mode 100644 _graveyard_/inventory/hosts.ini (limited to '_graveyard_') diff --git a/_graveyard_/chaos-at-home/host_vars/r3-cccamp19-sw0.yml b/_graveyard_/chaos-at-home/host_vars/r3-cccamp19-sw0.yml new file mode 100644 index 00000000..9a0e7782 --- /dev/null +++ b/_graveyard_/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/_graveyard_/chaos-at-home/r3-cccamp19-gw.yml b/_graveyard_/chaos-at-home/r3-cccamp19-gw.yml new file mode 100644 index 00000000..e92370ac --- /dev/null +++ b/_graveyard_/chaos-at-home/r3-cccamp19-gw.yml @@ -0,0 +1,5 @@ +--- +- name: configure dyndns + hosts: r3-cccamp19-gw + roles: + - role: dyndns/client diff --git a/_graveyard_/chaos-at-home/r3-cccamp19-sw0.yml b/_graveyard_/chaos-at-home/r3-cccamp19-sw0.yml new file mode 100644 index 00000000..36ee99f5 --- /dev/null +++ b/_graveyard_/chaos-at-home/r3-cccamp19-sw0.yml @@ -0,0 +1,8 @@ +--- +- name: bootstrap + hosts: r3-cccamp19-sw0 + gather_facts: no + roles: + - role: dellos6/bootstrap + - role: dellos6/base + - role: dellos6/layer2 diff --git a/_graveyard_/chaos-at-home/r3-cccamp19_vm.yml b/_graveyard_/chaos-at-home/r3-cccamp19_vm.yml new file mode 100644 index 00000000..fa4ffb77 --- /dev/null +++ b/_graveyard_/chaos-at-home/r3-cccamp19_vm.yml @@ -0,0 +1,9 @@ +--- +- name: Basic Setup + hosts: "{{ install_hostname }}" + roles: + - role: apt-repo/base + - role: core/base + - role: core/sshd + - role: core/zsh + - role: dyndns/client diff --git a/_graveyard_/chaos-at-home/r3-vex2.yml b/_graveyard_/chaos-at-home/r3-vex2.yml new file mode 100644 index 00000000..4efac0a8 --- /dev/null +++ b/_graveyard_/chaos-at-home/r3-vex2.yml @@ -0,0 +1,7 @@ +--- +- name: nothing to see here + hosts: r3-vex2 + tasks: + - name: do nothing + debug: + msg: "all the rest is done using the realraum ansible repo" diff --git a/_graveyard_/inventory/group_vars/r3-cccamp19/network.yml b/_graveyard_/inventory/group_vars/r3-cccamp19/network.yml new file mode 100644 index 00000000..82216ea6 --- /dev/null +++ b/_graveyard_/inventory/group_vars/r3-cccamp19/network.yml @@ -0,0 +1,33 @@ +--- +network_zones: + camp19: + vlan: 19 + + lan: + vlan: 126 + prefix: 192.168.126.0/24 + gateway: 192.168.126.254 + dns: + - 192.168.126.254 + dhcp: + start: 1 + limit: 199 + offsets: + r3-cccamp19-dione: 200 + r3-cccamp19-helene: 201 + r3-cccamp19-flora: 220 + r3-cccamp19-verr: 221 + r3-cccamp19-feedcode: 222 + r3-cccamp19-av: 223 + r3-cccamp19-gw: 254 + + mgmt: + vlan: 41 + prefix: 192.168.41.0/24 + offsets: + r3-cccamp19-dione: 100 + r3-cccamp19-helene: 101 + r3-cccamp19-sw0: 200 + r3-cccamp19-sw1: 201 + r3-cccamp19-sw2: 202 + r3-cccamp19-gw: 254 diff --git a/_graveyard_/inventory/host_vars/r3-cccamp19-av.yml b/_graveyard_/inventory/host_vars/r3-cccamp19-av.yml new file mode 100644 index 00000000..40524574 --- /dev/null +++ b/_graveyard_/inventory/host_vars/r3-cccamp19-av.yml @@ -0,0 +1,38 @@ +--- +_vm_host_: helene + +install: + vm: + host: "{{ _vm_host_ }}" + mem: 4096 + numcpu: 4 + autostart: True + disks: + primary: /dev/sda + scsi: + sda: + type: lvm + vg: "{{ hostvars[_vm_host_].host_name }}" + lv: "{{ inventory_hostname }}" + size: 10g + interfaces: + - bridge: lan-br + name: lan0 + - bridge: camp19-br + name: camp0 + +network: + nameservers: "{{ network_zones.lan.dns }}" + domain: "{{ host_domain }}" + systemd_link: + interfaces: "{{ install.interfaces }}" + primary: + interface: lan0 + ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" + mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + gateway: "{{ network_zones.lan.gateway }}" + +install_playbook: r3-cccamp19_vm + +dyndns: + server: ch-pan diff --git a/_graveyard_/inventory/host_vars/r3-cccamp19-dione.yml b/_graveyard_/inventory/host_vars/r3-cccamp19-dione.yml new file mode 100644 index 00000000..47195b1f --- /dev/null +++ b/_graveyard_/inventory/host_vars/r3-cccamp19-dione.yml @@ -0,0 +1,18 @@ +--- +install_interface: eno1 +install_dhcp: true + +install: + efi: true + disks: + primary: /dev/disk/by-id/nvme-SAMSUNG_MZVPW256HEGL-00000_S346NY0HC29501 + +network: + domain: camp.realraum.at + + +base_packages_extra_host: + - vlan + +dyndns: + server: ch-pan diff --git a/_graveyard_/inventory/host_vars/r3-cccamp19-feedcode.yml b/_graveyard_/inventory/host_vars/r3-cccamp19-feedcode.yml new file mode 100644 index 00000000..10f78ebc --- /dev/null +++ b/_graveyard_/inventory/host_vars/r3-cccamp19-feedcode.yml @@ -0,0 +1,33 @@ +--- +_vm_host_: helene + +install: + vm: + host: "{{ _vm_host_ }}" + mem: 6144 + numcpu: 4 + autostart: True + disks: + primary: /dev/sda + scsi: + sda: + type: lvm + vg: "{{ hostvars[_vm_host_].host_name }}" + lv: "{{ inventory_hostname }}" + size: 42g + interfaces: + - bridge: lan-br + name: lan0 + - bridge: camp19-br + name: camp0 + +network: + nameservers: "{{ network_zones.lan.dns }}" + domain: "{{ host_domain }}" + systemd_link: + interfaces: "{{ install.interfaces }}" + primary: + interface: lan0 + ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" + mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + gateway: "{{ network_zones.lan.gateway }}" diff --git a/_graveyard_/inventory/host_vars/r3-cccamp19-flora.yml b/_graveyard_/inventory/host_vars/r3-cccamp19-flora.yml new file mode 100644 index 00000000..40524574 --- /dev/null +++ b/_graveyard_/inventory/host_vars/r3-cccamp19-flora.yml @@ -0,0 +1,38 @@ +--- +_vm_host_: helene + +install: + vm: + host: "{{ _vm_host_ }}" + mem: 4096 + numcpu: 4 + autostart: True + disks: + primary: /dev/sda + scsi: + sda: + type: lvm + vg: "{{ hostvars[_vm_host_].host_name }}" + lv: "{{ inventory_hostname }}" + size: 10g + interfaces: + - bridge: lan-br + name: lan0 + - bridge: camp19-br + name: camp0 + +network: + nameservers: "{{ network_zones.lan.dns }}" + domain: "{{ host_domain }}" + systemd_link: + interfaces: "{{ install.interfaces }}" + primary: + interface: lan0 + ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" + mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + gateway: "{{ network_zones.lan.gateway }}" + +install_playbook: r3-cccamp19_vm + +dyndns: + server: ch-pan diff --git a/_graveyard_/inventory/host_vars/r3-cccamp19-gw.yml b/_graveyard_/inventory/host_vars/r3-cccamp19-gw.yml new file mode 100644 index 00000000..c6150b4d --- /dev/null +++ b/_graveyard_/inventory/host_vars/r3-cccamp19-gw.yml @@ -0,0 +1,3 @@ +--- +dyndns: + server: ch-pan diff --git a/_graveyard_/inventory/host_vars/r3-cccamp19-helene.yml b/_graveyard_/inventory/host_vars/r3-cccamp19-helene.yml new file mode 100644 index 00000000..104a5eda --- /dev/null +++ b/_graveyard_/inventory/host_vars/r3-cccamp19-helene.yml @@ -0,0 +1,18 @@ +--- +install_interface: eno1 +install_dhcp: true + +install: + efi: true + disks: + primary: /dev/disk/by-id/nvme-SAMSUNG_MZVPW256HEGL-00000_S346NB0J803346 + +network: + domain: camp.realraum.at + + +base_packages_extra_host: + - vlan + +dyndns: + server: ch-pan diff --git a/_graveyard_/inventory/host_vars/r3-cccamp19-sw0.yml b/_graveyard_/inventory/host_vars/r3-cccamp19-sw0.yml new file mode 100644 index 00000000..5b01d940 --- /dev/null +++ b/_graveyard_/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/_graveyard_/inventory/host_vars/r3-cccamp19-verr.yml b/_graveyard_/inventory/host_vars/r3-cccamp19-verr.yml new file mode 100644 index 00000000..f4e70d57 --- /dev/null +++ b/_graveyard_/inventory/host_vars/r3-cccamp19-verr.yml @@ -0,0 +1,38 @@ +--- +_vm_host_: helene + +install: + vm: + host: "{{ _vm_host_ }}" + mem: 4096 + numcpu: 4 + autostart: True + disks: + primary: /dev/sda + scsi: + sda: + type: lvm + vg: "{{ hostvars[_vm_host_].host_name }}" + lv: "{{ inventory_hostname }}" + size: 20g + interfaces: + - bridge: lan-br + name: lan0 + - bridge: camp19-br + name: camp0 + +network: + nameservers: "{{ network_zones.lan.dns }}" + domain: "{{ host_domain }}" + systemd_link: + interfaces: "{{ install.interfaces }}" + primary: + interface: lan0 + ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}" + mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + gateway: "{{ network_zones.lan.gateway }}" + +install_playbook: r3-cccamp19_vm + +dyndns: + server: ch-pan diff --git a/_graveyard_/inventory/hosts.ini b/_graveyard_/inventory/hosts.ini new file mode 100644 index 00000000..f53d6a86 --- /dev/null +++ b/_graveyard_/inventory/hosts.ini @@ -0,0 +1,36 @@ +############################### +# environment: chaos-at-home + +[realraum:children] +r3-cccamp19 + +[r3-cccamp19:vars] +host_domain=camp.realraum.at + +[r3-cccamp19] +r3-cccamp19-helene host_name=helene +r3-cccamp19-dione host_name=dione +r3-cccamp19-gw +r3-cccamp19-sw0 ansible_host=192.168.41.200 ansible_port=22 +r3-cccamp19-flora host_name=flora +r3-cccamp19-verr host_name=verr +r3-cccamp19-feedcode host_name=feedcode +r3-cccamp19-av host_name=av + + +############################### +# host categories + +[dellos6] +r3-cccamp19-sw0 + + +[kvmhosts] +r3-cccamp19-dione +r3-cccamp19-helene + +[kvmguests] +r3-cccamp19-flora +r3-cccamp19-verr +r3-cccamp19-feedcode +r3-cccamp19-av -- cgit v1.2.3