From 75284cc033a7dbd1992e4f9d3c8bfb7998bd7cc9 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 11 Jul 2019 14:29:45 +0200 Subject: addd host: ch-gw-lan --- chaos-at-home/ch-gw-lan.yml | 7 ++++++ inventory/group_vars/chaos_at_home/network.yml | 3 +++ inventory/host_vars/ch-gw-lan.yml | 31 ++++++++++++++++++++++++++ inventory/hosts.ini | 3 ++- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 chaos-at-home/ch-gw-lan.yml create mode 100644 inventory/host_vars/ch-gw-lan.yml diff --git a/chaos-at-home/ch-gw-lan.yml b/chaos-at-home/ch-gw-lan.yml new file mode 100644 index 00000000..a1d81d88 --- /dev/null +++ b/chaos-at-home/ch-gw-lan.yml @@ -0,0 +1,7 @@ +--- +- name: Basic Setup + hosts: ch-gw-lan + roles: + - role: base + - role: sshd + - role: zsh diff --git a/inventory/group_vars/chaos_at_home/network.yml b/inventory/group_vars/chaos_at_home/network.yml index 7e317bbc..31a2b6fd 100644 --- a/inventory/group_vars/chaos_at_home/network.yml +++ b/inventory/group_vars/chaos_at_home/network.yml @@ -9,6 +9,8 @@ network_zones: dhcp: start: 1 limit: 199 + offsets: + ch-gw-lan: 254 wifi: ssid: "chaos at home" encryption: "psk2" @@ -34,6 +36,7 @@ network_zones: - 9.9.9.9 offsets: ch-jump: 22 + ch-gw-lan: 28 web: 80 mail: 143 ch-router: 254 diff --git a/inventory/host_vars/ch-gw-lan.yml b/inventory/host_vars/ch-gw-lan.yml new file mode 100644 index 00000000..4fc9eef1 --- /dev/null +++ b/inventory/host_vars/ch-gw-lan.yml @@ -0,0 +1,31 @@ +--- +vm_host: ch-gnocchi + +install: + host: "{{ vm_host }}" + mem: 1024 + numcpu: 2 + disks: + primary: /dev/sda + scsi: + sda: + vg: "{{ hostvars[vm_host].host_name }}" + lv: "{{ inventory_hostname }}" + size: 10g + interfaces: + - bridge: br-svc + name: svc0 + - bridge: br-lan + name: lan0 + autostart: True + +network: + nameservers: "{{ network_zones.svc.dns }}" + domain: "{{ host_domain }}" + systemd_link: + interfaces: "{{ install.interfaces }}" + primary: + interface: svc0 + ip: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}" + mask: "{{ network_zones.svc.prefix | ipaddr('netmask') }}" + gateway: "{{ network_zones.svc.gw }}" diff --git a/inventory/hosts.ini b/inventory/hosts.ini index 77a3efff..87a51a43 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -20,7 +20,7 @@ ch-keyserver host_name=keyserver ch-pan host_name=pan ch-gnocchi host_name=gnocchi ch-router host_name=router -ch-gwlan host_name=gwlan +ch-gw-lan host_name=gw-lan ch-jump host_name=jump ansible_port=2342 ansible_host=ch-jump [chaos_at_home:children] @@ -161,6 +161,7 @@ ch-gnocchi emc-stats emc-master ch-keyserver +ch-gw-lan ch-jump r3-vex2 -- cgit v1.2.3