fp/ansible/roles/ipfs/tasks/blockstorage.yml
CJ_Clippy 325fe576e2
Some checks failed
ci / test (push) Failing after 6m3s
fp/our CI/CD / build (push) Successful in 1m27s
add ipfs playbook
2025-10-04 08:45:34 -08:00

29 lines
666 B
YAML

---
- 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