Article 53CM1 Ansible roles - Parted

Ansible roles - Parted

by
wurzel1972
from LinuxQuestions.org on (#53CM1)
I am struggling to find any information on creating a Physical volume using parted in a role. I can do it in a playbook but roles always fail with an error code as below:

fatal: [server3.example.com]: FAILED! => {"changed": false, "err": "/sbin/parted: invalid token: [lvol]\n", "msg": "Error while running parted script: /sbin/parted -s -m -a optimal /dev/sdb -- unit KiB set 1 [lvol] on", "out": "", "rc": 1}

The line in the task is as follows:
- parted: device=/dev/sdb number=1 label=msdos flags=[lvol] state=present

Please can someone let me know what I am doing wrong.

Regards,
Davelatest?d=yIl2AUoC8zA latest?i=tMeunfLjP3E:iOcqpIzUgg4:F7zBnMy latest?i=tMeunfLjP3E:iOcqpIzUgg4:V_sGLiP latest?d=qj6IDK7rITs latest?i=tMeunfLjP3E:iOcqpIzUgg4:gIN9vFwtMeunfLjP3E
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments