A few month ago we have published an article on how to mount the root filesystem of a Raspberry PI read-only. We have used the rpi-utils to reach our goal. But the main disadvantage was the manual process to copy all the scripts and setup the filesystem. That's why we have created an ansible role to automate the setup process.
ansible-galaxy install DinoTools.raspi_ro_root
After installing the role you should be able to use it like in the example below.
- hosts: localhost become: yes roles: - DinoTools.raspi_ro_root
Feel free to test the role and report any issues on GitHub.
- Website: Raspberry PI (English)
- Website: ansible role 'raspi_ro_root' on GitHub (English)
- Website: ansible role 'raspi_ro_root' in the ansible galaxy (English)