--- - name: Create gpt table on /dev/vdb community.general.parted: device: /dev/vdb number: 1 part_type: primary label: gpt fs_type: ext4 state: present - name: Create an ext4 filesystem on /dev/vdb1 community.general.filesystem: fstype: ext4 dev: /dev/vdb1 - name: Get UUID of /dev/vdb1 ansible.builtin.command: cmd: blkid -s UUID -o value /dev/vdb1 register: ipfs_vdb1_uuid changed_when: false - name: Mount /dev/vdb1 to /mnt/blockstorage ansible.posix.mount: path: /mnt/blockstorage src: /dev/disk/by-uuid/{{ ipfs_vdb1_uuid.stdout }} fstype: ext4 opts: defaults,noatime,nofail state: mounted