I have an Ansible playbook for creating and resizing logical Volumes
# playbook lvol.yml
- hosts: step
tasks:
- name: 'create /dev/sdb1 -> 20GB (of 35GB)'
community.general.parted:
device: /dev/sdb
number: 1
state: present
# fs_type: ext4
- name: "resize vgsys by /dev/sdb1"
community.general.lvg:
vg: vgsys
pvs: /dev/sdb1
- name: "extend lv 'name' to 10GB from /dev/sdb (35GB)"
community.general.lvol:
vg: vgsys
lv: name
size: 10g
The yaml syntax seems to be good (checked with onlineyamltools.com) but I am getting this error on execution:
ERROR! conflicting action statements: community.general.parted, device
The error appears to be in '/path/to/lvol.yml': line 4, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: 'create /dev/sdb1 -> 20GB (of 35GB)'
^ here
if I comment out the first (community.general.parted) task the same error appears for the second (lvol) task.
can anybody kindly point me to the right direction on how to get over this?