ansible/playbooks/raspberrypi5_setup.yaml
2023-12-05 17:35:50 +01:00

26 lines
814 B
YAML

- hosts: containers
name: Sync mailu
ignore_unreachable: false
tasks:
- name: Stop swap
ansible.builtin.shell: 'dphys-swapfile swapoff'
become: true
when: inventory_hostname in groups['raspberrypi5']
- name: Reconfigure swap size
ansible.builtin.lineinfile:
path: /etc/dphys-swapfile
regexp: "^CONF_SWAPSIZE=.*"
line: "CONF_SWAPSIZE=2048"
become: true
when: inventory_hostname in groups['raspberrypi5']
- name: Start swap
ansible.builtin.shell: 'dphys-swapfile swapon'
become: true
when: inventory_hostname in groups['raspberrypi5']
- name: Disable wayland for vnc
ansible.builtin.shell: 'raspi-config nonint do_wayland W1'
become: true
when: inventory_hostname in groups['raspberrypi5']