diff --git a/README.md b/README.md index d319493..8f6dc78 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,11 @@ When logged in the user will be prompted with the **zsh** configured with **[Oh It can be handy to reinstall the Pi. First shutdown the pi by running `sudo shutdown` from SSH. Next take out the memory card and follow all steps in [Raspberry Pi preperation](#raspberry-pi-preperation). For the next step remove the current *known_hosts* entry with: `ssh-keygen -R '192.168.50.27'` for all PCs that had SSH access to the Pi. +### The external Kingston drive +An external 1 TiB drive is installed. The drive isn't directly managed by Ansible although some files/folders might be written to from it. +Use [this guide](https://raspberrytips.com/format-mount-usb-drive/) for setting up the proper filesystem. +Notice that mounting the volume automatically via **/etc/fstab** is done automatically by Ansible. + ### Debugging users other than the main user The **user** role included in this repository makes it possible to create new users which will also have a fully configured ZSH environment. They can't be accessed via SSH because no SSH keys are added for them and password logins are disabled. diff --git a/playbook.yml b/playbook.yml index c3519aa..10e256c 100644 --- a/playbook.yml +++ b/playbook.yml @@ -9,6 +9,7 @@ roles: # These roles are disabled after they have being applied once for performance reasons, it should be safe to enable them again. # Notice that this role changes some settings on reruns (on the "Change various sysctl-settings" task), doesn't seem problematic though. + - role: fstab - role: devsec.hardening.ssh_hardening become: true - role: geerlingguy.docker diff --git a/roles/fstab/tasks/main.yml b/roles/fstab/tasks/main.yml new file mode 100644 index 0000000..c9bf700 --- /dev/null +++ b/roles/fstab/tasks/main.yml @@ -0,0 +1,15 @@ +--- +- name: Mount the external disk automatically + become: true + ansible.posix.mount: + path: /bulk + src: "PARTUUID={{ disk_part_uuid }}" + fstype: ext4 + opts: defaults + state: mounted +- name: Grant permissions to created /bulk volume + become: true + ansible.builtin.file: + path: /bulk + state: directory + mode: '0777' diff --git a/roles/fstab/vars/main/defaults.yml b/roles/fstab/vars/main/defaults.yml new file mode 100644 index 0000000..58c93d8 --- /dev/null +++ b/roles/fstab/vars/main/defaults.yml @@ -0,0 +1,2 @@ +--- +disk_part_uuid: '46c2e279-f56d-a64b-816e-24faf8b214c6'