ansible module to partition and format disk

6,786 views
Skip to first unread message

hce h

unread,
Jan 19, 2015, 6:02:47 AM1/19/15
to ansible...@googlegroups.com
Hi,

What are the ansible modules to partition and format (mkfs.ext4) disks?

Thank you.
 
- j

Brian Coca

unread,
Jan 19, 2015, 10:43:42 AM1/19/15
to ansible...@googlegroups.com
i think you want the filesystem module

http://docs.ansible.com/filesystem_module.html

--
Brian Coca

hce h

unread,
Jan 19, 2015, 6:40:45 PM1/19/15
to ansible...@googlegroups.com
Thanks Brian, but I also want to partition the disk, the filesystem_module doesn't seem able to do the partition, collect me if I am wrong.

Brian Coca

unread,
Jan 19, 2015, 6:57:23 PM1/19/15
to ansible...@googlegroups.com
no, it can just create filesystems. There are modules for lvm but
nothing for creating partitions from scratch (yet).



--
Brian Coca

Fabrizio Colonna

unread,
Nov 14, 2016, 10:42:52 AM11/14/16
to Ansible Project
For you if you still need it and for new people that will land here, there is this parted module for Ansible awaiting pull request that does what you need: https://github.com/ansible/ansible-modules-extras/pull/2971
Reply all
Reply to author
Forward
0 new messages