summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chaos-at-home/ch-raspi-ntp.yml9
-rw-r--r--inventory/group_vars/chaos-at-home/network.yml1
-rw-r--r--inventory/host_vars/ch-raspi-ntp.yml2
-rw-r--r--inventory/hosts.ini1
-rw-r--r--roles/slim/raspbian/defaults/main.yml1
-rw-r--r--roles/slim/raspbian/tasks/main.yml25
6 files changed, 34 insertions, 5 deletions
diff --git a/chaos-at-home/ch-raspi-ntp.yml b/chaos-at-home/ch-raspi-ntp.yml
new file mode 100644
index 00000000..548e5d0c
--- /dev/null
+++ b/chaos-at-home/ch-raspi-ntp.yml
@@ -0,0 +1,9 @@
+---
+- name: Basic Setup
+ hosts: ch-raspi-ntp
+ roles:
+ - role: slim/raspbian
+# - role: apt-repo/base ## TODO: this role does not yet support rasbian since detection is not as trivial as one would think
+ - role: core/base
+ - role: core/sshd/base
+ - role: core/zsh
diff --git a/inventory/group_vars/chaos-at-home/network.yml b/inventory/group_vars/chaos-at-home/network.yml
index 904c6b23..5034c43a 100644
--- a/inventory/group_vars/chaos-at-home/network.yml
+++ b/inventory/group_vars/chaos-at-home/network.yml
@@ -22,6 +22,7 @@ network_zones:
ch-hpws-maxi: 30
ch-hpws-mini1: 31
ch-alix1d: 32
+ ch-raspi-ntp: 33
ch-prometheus: 200
ch-epimetheus: 201
ch-gw-lan: 254
diff --git a/inventory/host_vars/ch-raspi-ntp.yml b/inventory/host_vars/ch-raspi-ntp.yml
new file mode 100644
index 00000000..4f8d6a66
--- /dev/null
+++ b/inventory/host_vars/ch-raspi-ntp.yml
@@ -0,0 +1,2 @@
+---
+raspbian_disable_wifi: false
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index 36d2751e..b1c5b338 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -49,6 +49,7 @@ ch-k8s-master host_name=k8s-master
ch-hpws-maxi
ch-hpws-mini1
ch-alix1d
+ch-raspi-ntp
[chaos-at-home:children]
mz-chaos-at-home
diff --git a/roles/slim/raspbian/defaults/main.yml b/roles/slim/raspbian/defaults/main.yml
index 15c13afb..a41afb00 100644
--- a/roles/slim/raspbian/defaults/main.yml
+++ b/roles/slim/raspbian/defaults/main.yml
@@ -1,3 +1,4 @@
---
raspbian_disable_wifi: true
raspbian_disable_bluetooth: true
+raspbian_disable_audio: true
diff --git a/roles/slim/raspbian/tasks/main.yml b/roles/slim/raspbian/tasks/main.yml
index 8f41dff1..d943d6aa 100644
--- a/roles/slim/raspbian/tasks/main.yml
+++ b/roles/slim/raspbian/tasks/main.yml
@@ -1,16 +1,23 @@
---
-## TODO: for now we assume we are running on a rpi-3
- name: enable/disable wifi
lineinfile:
path: /boot/config.txt
- line: dtoverlay=pi3-disable-wifi
- state: "{% if raspbian_disable_wifi %}present{% else %}absent{% endif %}"
+ line: dtoverlay=disable-wifi
+ insertafter: '^\[all\]'
+ state: "{{ raspbian_disable_wifi | ternary('present', 'absent') }}"
- name: enable/disable bluetooh
lineinfile:
path: /boot/config.txt
- line: dtoverlay=pi3-disable-bt
- state: "{% if raspbian_disable_bluetooth %}present{% else %}absent{% endif %}"
+ line: dtoverlay=disable-bt
+ insertafter: '^\[all\]'
+ state: "{{ raspbian_disable_bluetooth | ternary('present', 'absent') }}"
+
+- name: enable/disable audio
+ lineinfile:
+ path: /boot/config.txt
+ regexp: '^dtparam=audio='
+ line: "dtparam=audio={{ raspbian_disable_audio | ternary('off', 'on') }}"
- name: enable ssh-server
systemd:
@@ -39,3 +46,11 @@
backrefs: yes
regexp: '^(127.0.1.1\s+)'
line: '\g<1>{{ host_name }}'
+
+- name: remove vscode sources.list and microsoft gpg key
+ loop:
+ - sources.list.d/vscode.list
+ - trusted.gpg.d/microsoft.gpg
+ file:
+ path: "/etc/apt/{{ item }}"
+ state: absent