I wanted to create a partition /dev/sdb2 on an empty disk. Ansible task looks as below:
community.general.parted:
device: "/dev/sdb"
number: "2"
state: present
part_end: "100%"
fs_type: xfs
part_type: primary
Ansible parted runs this line according to a message it throws when i want to make it for 2nd time: /sbin/parted -s -m -a optimal /dev/sdb -- unit KiB mkpart primary xfs 0% 100%'
The number property, does not look like it is changing something. It is always making sdb1, am i doing something wrong ? Or maybe it was never supposed to support that number ? According to documentation this number should make the desired partition number. "The number of the partition to work with or the number of the partition that will be created."
ansible [core 2.11.6]
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/venv/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /root/venv/bin/ansible
python version = 3.9.7 (default, May 10 2022, 23:45:56) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]
jinja version = 2.11.3
libyaml = True