summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-03-10 13:16:58 +0100
committerChristian Pointner <equinox@spreadspace.org>2019-03-10 13:16:58 +0100
commitb66d1bebad0e5c98f18b4acb70a548d191a87ed1 (patch)
treedfadab0db68c5196d096648750621f839a99e0ae
parentcleanup k8s-emc cluster (diff)
added mz-ap
-rw-r--r--chaos-at-home/group_vars/all.yml10
-rw-r--r--chaos-at-home/mz-ap.yml6
-rw-r--r--inventory/host_vars/mz-ap.yml156
-rw-r--r--inventory/hosts.ini7
4 files changed, 179 insertions, 0 deletions
diff --git a/chaos-at-home/group_vars/all.yml b/chaos-at-home/group_vars/all.yml
new file mode 100644
index 00000000..45690ced
--- /dev/null
+++ b/chaos-at-home/group_vars/all.yml
@@ -0,0 +1,10 @@
+$ANSIBLE_VAULT;1.2;AES256;chaos-at-home
+35386561313935656364616336626666346333343132326536313932373038336236653565653563
+3330303666363363636432346131376239376364666565340a336162666433336261363530386234
+34616535343962346530623533353764663336326132663633653065326436643736313537326466
+6261613462626334390a346638303832326534393231376262613033633136336238356439666131
+63663166623838346565393663363839373730326564333335396238613232313466313365346565
+66366262373438326138366466653035386637343763313637643536643265363736393435383132
+35376661393961383962353165626637313565323830336138663662336362333633363936666236
+62306538633362616466663938323033656634383563333534653936626566643932633032646538
+34623932653531383966326438343361393536373965346464616239303961656432
diff --git a/chaos-at-home/mz-ap.yml b/chaos-at-home/mz-ap.yml
new file mode 100644
index 00000000..e4e3a1fe
--- /dev/null
+++ b/chaos-at-home/mz-ap.yml
@@ -0,0 +1,6 @@
+---
+- hosts: mz-ap
+ connection: local
+ roles:
+ - role: openwrt/image
+ delegate_to: localhost
diff --git a/inventory/host_vars/mz-ap.yml b/inventory/host_vars/mz-ap.yml
new file mode 100644
index 00000000..a63db7f9
--- /dev/null
+++ b/inventory/host_vars/mz-ap.yml
@@ -0,0 +1,156 @@
+---
+openwrt_variant: openwrt
+openwrt_release: 18.06.2
+openwrt_arch: ar71xx
+openwrt_target: generic
+openwrt_profile: tl-wdr3500-v1
+openwrt_output_image_suffixes:
+ - "generic-{{ openwrt_profile }}-squashfs-sysupgrade.bin"
+
+openwrt_packages_remove:
+ - ppp
+ - ppp-mod-pppoe
+ - dnsmasq
+ - firewall
+ - odhcpd
+ - odhcpd-ipv6only
+openwrt_packages_add:
+ - haveged
+ - htop
+ - ip
+ - less
+ - nano
+ - tcpdump-mini
+ - iperf
+ - mtr
+ - usbutils
+ - kmod-usb-printer
+ - p910nd
+
+
+openwrt_mixin:
+ /etc/dropbear/authorized_keys:
+ content: "{{ ssh_keys_root | join('\n') }}\n"
+
+ /etc/htoprc:
+ file: "{{ global_files_dir }}/common/htoprc"
+
+
+openwrt_uci:
+ system:
+ - name: system
+ options:
+ hostname: '{{ host_name }}'
+ timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
+ ttylogin: '0'
+ log_size: '64'
+ urandom_seed: '0'
+
+ - name: timeserver 'ntp'
+ options:
+ enabled: '1'
+ enable_server: '0'
+ server:
+ - '0.lede.pool.ntp.org'
+ - '1.lede.pool.ntp.org'
+ - '2.lede.pool.ntp.org'
+ - '3.lede.pool.ntp.org'
+
+ dropbear:
+ - name: dropbear
+ options:
+ PasswordAuth: 'off'
+ RootPasswordAuth: 'off'
+ Port: '22000'
+
+ p910nd:
+ - name: p910nd
+ options:
+ device: /dev/usb/lp0
+ port: 0
+ bidirectional: 1
+ enabled: 1
+
+ network:
+ - name: globals 'globals'
+ options:
+ ula_prefix: "fc{{ '%02x:%04x:%04x' | format((255 | random(seed=inventory_hostname + '0')), (65535 | random(seed=inventory_hostname + '1')), (65535 | random(seed=inventory_hostname + '2'))) }}::/48"
+
+ - name: interface 'loopback'
+ options:
+ ifname: lo
+ proto: static
+ ipaddr: 127.0.0.1
+ netmask: 255.0.0.0
+
+ - name: switch
+ options:
+ name: switch0
+ reset: 1
+ enable_vlan: 1
+
+ - name: switch_vlan
+ options:
+ device: switch0
+ vlan: 1
+ ports: 0 1 2 3 4
+
+ - name: interface 'lan'
+ options:
+ ifname: eth0
+ force_link: 1
+ type: bridge
+ proto: static
+ ipaddr: 192.168.2.201
+ netmask: 255.255.255.0
+ gateway: 192.168.2.254
+ dns:
+ - 192.168.2.254
+
+ - name: interface 'wan'
+ options:
+ ifname: eth1
+ proto: none
+
+ wireless:
+ - name: wifi-device 'radio5g'
+ options:
+ type: mac80211
+ path: "pci0000:00/0000:00:00.0"
+ hwmode: 11a
+ htmode: HT20
+ country: AT
+ txpower: 19
+
+ - name: wifi-device 'radio2g4'
+ options:
+ type: mac80211
+ path: "platform/ar934x_wmac"
+ hwmode: 11g
+ htmode: HT20
+ channel: 4
+ country: AT
+ txpower: 20
+
+ - name: wifi-iface wds5g
+ options:
+ device: radio5g
+ network: lan
+ mode: sta
+ wds: 1
+ disassoc_low_ack: 1
+ rsn_preauth: 1
+ ssid: "chaosWDS"
+ encryption: 'psk2+ccmp'
+ key: '{{ vault_wifi_keys.wds_mz }}'
+
+ - name: wifi-iface lan2g4
+ options:
+ device: radio2g4
+ network: lan
+ mode: ap
+ disassoc_low_ack: 1
+ rsn_preauth: 1
+ ssid: "chaos at home"
+ encryption: 'psk2+ccmp'
+ key: '{{ vault_wifi_keys.lan }}'
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index ad6bde0c..f0458932 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -19,6 +19,13 @@ atlas
keyserver
pan ansible_host=ch-pan ansible_port=222
+[chaos-at-home:children]
+mz-chaos-at-home
+
+
+[mz-chaos-at-home]
+mz-ap ansible_host=chmz-ap
+
[k8s-test:vars]
env_group=chaos-at-home