--- - hosts: servers vars_files: - ../variables.yml become: true tasks: - name: Ensure /mnt/hdds directory file: path: /mnt/hdds state: directory - name: Unmount HDDS ansible.posix.mount: path: /mnt/hdds/ src: "UUID={{hdds_uuid}}" fstype: ext4 state: unmounted opts: defaults,nofail - name: Make /mnt/hdds immutable ansible.builtin.shell: chattr +i /mnt/hdds - name: Mount HDDS ansible.posix.mount: path: /mnt/hdds src: "UUID={{hdds_uuid}}" fstype: ext4 state: mounted opts: defaults,nofail - name: Ensure /mnt/ssd0 directory file: path: /mnt/ssd0 state: directory - name: Unmount SSD0 ansible.posix.mount: path: /mnt/ssd0/ src: "UUID={{ssd0_uuid}}" fstype: ext4 state: unmounted opts: defaults,nofail - name: Make /mnt/ssd0 immutable ansible.builtin.shell: chattr +i /mnt/ssd0 - name: Mount SSD0 ansible.posix.mount: path: /mnt/ssd0/ src: "UUID={{ssd0_uuid}}" fstype: ext4 state: mounted opts: defaults,nofail