diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-02-23 14:55:17 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-02-23 14:55:31 +0100 |
commit | ff4823b366f5b8434b4f5a48d80781678a1bd1cf (patch) | |
tree | 7e5e378ccc47fba3ef64bce3a883e5046706c3b1 /roles/slim/raspbian/tasks/main.yml | |
parent | move slim roles in sub directory (diff) |
basic raspbian support
Diffstat (limited to 'roles/slim/raspbian/tasks/main.yml')
-rw-r--r-- | roles/slim/raspbian/tasks/main.yml | 36 |
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 }}' |