ansible / ansible.builtin / v2.4.0.0-1 / module / filesystem Makes file system on block device | "added in version" 1.2 of ansible.builtin" Authors: Alexander Bulimov (@abulimov) preview | supported by communityansible.builtin.filesystem (v2.4.0.0-1) — module
pip
Install with pip install ansible==2.4.0.0.post1
This module creates file system.
# Create a ext2 filesystem on /dev/sdb1. - filesystem: fstype: ext2 dev: /dev/sdb1
# Create a ext4 filesystem on /dev/sdb1 and check disk blocks. - filesystem: fstype: ext4 dev: /dev/sdb1 opts: -cc
dev: description: - Target block device. required: true opts: description: - List of options to be passed to mkfs command. force: choices: - 'yes' - 'no' default: 'no' description: - If yes, allows to create new filesystem on devices that already has filesystem. required: false fstype: description: - File System type to be created. - reiserfs support was added in 2.2. required: true resizefs: choices: - 'yes' - 'no' default: 'no' description: - If yes, if the block device and filessytem size differ, grow the filesystem into the space. Note, XFS Will only grow if mounted. required: false version_added: '2.0' version_added_collection: ansible.builtin