--- ## 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: remove sudoers config for pi user file: path: /etc/sudoers.d/010_pi-nopasswd state: absent - 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 }}'