summaryrefslogtreecommitdiff
path: root/roles/slim/raspbian/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/slim/raspbian/tasks')
-rw-r--r--roles/slim/raspbian/tasks/main.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/roles/slim/raspbian/tasks/main.yml b/roles/slim/raspbian/tasks/main.yml
new file mode 100644
index 00000000..eb583c6e
--- /dev/null
+++ b/roles/slim/raspbian/tasks/main.yml
@@ -0,0 +1,36 @@
+---
+## 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 %}"
+
+- name: enable/disable bluetooh
+ lineinfile:
+ path: /boot/config.txt
+ line: dtoverlay=pi3-disable-bt
+ state: "{% if raspbian_disable_bluetooth %}present{% else %}absent{% endif %}"
+
+- name: enable ssh-server
+ systemd:
+ name: ssh
+ enabled: yes
+
+- name: remove pi user
+ user:
+ name: pi
+ state: absent
+ remove: yes
+ force: yes
+
+- name: set hostname
+ hostname:
+ name: "{{ host_name }}"
+
+- name: update hostname in /etc/hosts
+ lineinfile:
+ path: /etc/hosts
+ backrefs: yes
+ regexp: '^(127.0.1.1\s+)'
+ line: '\g<1>{{ host_name }}'