cross-posted from: lemmy.dbzer0.com/post/19310012
Hello,
I need some help here. I’ve been trying to write my own Ansible playbook to setup my homeserver. The storage devices on this server are 1 NVMe SSD and 2 HDDs which I want to setup as a mirror. I want to setup all storage devices as either BTRFS or ZFS but I’m having trouble finding the correct modules to use in Ansible for this.
I have also found some roles in Ansible Galaxy but those are either not explained enough for me to use and seem overwhelming to use (especially in comparison to the terminal commands that are needed to setup the BTRFS volumes or ZFS pools). But just using the builtin command module in Ansible somehow feels wrong and not the right way to go about this.
Can someone point me in the right direction? Right now I think I will prefer using BTRFS.
mojo_raisin@lemmy.world 6 months ago
You can use the parted module for partitioning
docs.ansible.com/ansible/…/parted_module.html#ans…
Format with BTRFS or many others
docs.ansible.com/…/filesystem_module.html#ansible…
These might come in handy:
For ZFS, I’m not familiar but I found
docs.ansible.com/…/zpool_facts_module.html#ansibl…
docs.ansible.com/ansible/…/zfs_module.html#ansibl…
docs.ansible.com/ansible/…/zfs_facts_module.html#…
Here’s the index of all modules: docs.ansible.com/ansible/…/index_module.html