summaryrefslogtreecommitdiff
path: root/chaos-at-home
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-02-17 03:03:14 +0100
committerChristian Pointner <equinox@spreadspace.org>2024-02-17 03:07:32 +0100
commit729f88e2894d491e5a4f77e7f8b888d23f0ea380 (patch)
tree8c330cff8e86eee9148f3fb7285d703a3e98ca6d /chaos-at-home
parentvm/*/network: add support for additinal addresses (diff)
kodi test install on intel compute stick
Diffstat (limited to 'chaos-at-home')
-rw-r--r--chaos-at-home/ch-mcstick.yml50
1 files changed, 50 insertions, 0 deletions
diff --git a/chaos-at-home/ch-mcstick.yml b/chaos-at-home/ch-mcstick.yml
new file mode 100644
index 00000000..24a68d93
--- /dev/null
+++ b/chaos-at-home/ch-mcstick.yml
@@ -0,0 +1,50 @@
+---
+- name: Basic Setup
+ hosts: ch-mcstick
+ roles:
+ - role: apt-repo/base
+ - role: core/base
+ - role: core/sshd/base
+ - role: core/zsh
+ - role: core/ntp
+
+- name: Payload Setup
+ hosts: ch-mcstick
+ roles:
+ - role: kodi/standalone
+ - role: kodi/config
+ post_tasks:
+ - name: install wifi stuff
+ apt:
+ name:
+ - wireless-tools
+ - wpasupplicant
+ - firmware-realtek
+ state: present
+
+ - name: generate wireless interface config
+ copy:
+ content: |
+ # ansible generated
+ auto wlan0
+ iface wlan0 inet static
+ up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
+ up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf
+ address {{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}
+ netmask {{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) | ansible.utils.ipaddr('netmask') }}
+ gateway {{ network_zones.lan.gateway }}
+ dns-nameservers {{ network_zones.lan.dns | join(' ') }}
+ dns-search {{ host_domain }}
+ wpa-ssid "{{ network_zones.lan.wifi.ssid }}"
+ wpa-psk "{{ network_zones.lan.wifi.key }}"
+ dest: /etc/network/interfaces.d/wifi
+ mode: 0600
+
+ - name: remove temporary USB-eth interface config
+ loop:
+ - '^auto {{ network.primary.name }}'
+ - '^iface {{ network.primary.name }}'
+ lineinfile:
+ path: "/etc/network/interfaces"
+ regexp: "{{ item }}"
+ state: absent