- fail:
    msg: possibly wrong server?
  when: ansible_distribution != 'Debian'
  
- name: drop the default user
  user:
    name: pi
    state: absent

- name: enable sshd (it is names just ssh in Raspberry OS)
  systemd:
    enabled: true
    state: started
    name: ssh

- name: reset to use of predictable names for ethernet nics
  file:
    path: /etc/systemd/network/99-default.link
    follow: no
    state: absent

- name: Disable stupid 100 MB file swap
  systemd:
    name: dphys-swapfile
    enabled: false
    state: stopped

- name: Use 64bit kernel
  lineinfile:
    insertafter: '^\[pi4\]$'
    regexp: '^arm_64bit='
    line: "arm_64bit=1"
    path: /boot/config.txt
  when: raspbian64
