
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,787 Views
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,769 Views
Hello @khokha !
As @TM mentioned , you need to use the ingredients modules for creating a LVM one by one :
1. parted to create partition with flags : [lvm]
2. lvg to create vol group.
3. lvol to create lv
4. file to create the mount point
5. filesystem to format the LVM with filesystem
6. mount to mount the LVM to the directory
Refer the lvol module here : https://docs.ansible.com/ansible/latest/collections/community/general/lvol_module.html
lvg module : https://docs.ansible.com/ansible/latest/collections/community/general/lvg_module.html


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,775 Views
Hello,
You can still use the ansible.builtin.command module.
But you might need to take extra steps and actions to ensure idempotency and "changed" status.
Regards,
Tshimanga

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,770 Views
Hello @khokha !
As @TM mentioned , you need to use the ingredients modules for creating a LVM one by one :
1. parted to create partition with flags : [lvm]
2. lvg to create vol group.
3. lvol to create lv
4. file to create the mount point
5. filesystem to format the LVM with filesystem
6. mount to mount the LVM to the directory
Refer the lvol module here : https://docs.ansible.com/ansible/latest/collections/community/general/lvol_module.html
lvg module : https://docs.ansible.com/ansible/latest/collections/community/general/lvg_module.html

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,667 Views
I'm having know problem with artifacts of lv , lets say that i want to create lv:lv1 if vg:vg1 exists , how can i write that in terms of ansible_facts?
i tried in the lab environment ansible_lvm['vgs'] it worked but on my personal lab it doesn't work.
another one, lets say if i want to format the lv:lv1 with xfs only if lv1 exists, how can i write this too in terms of ansible_facts?
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,127 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,752 Views
Hello!
Does EX294 allow the usage of the community.general?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,093 Views
Whatever you need for the exam will be provided - donot worry about it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,735 Views
Hello,
Certainly! To create a Logical Volume (LV) in RHEL 9 using Ansible without using roles, you can utilize the Ansible module called "lvol." This module allows you to define LV properties in your playbook directly, avoiding the need for roles. Simply specify the LV details like name, size, and VG (Volume Group) in your playbook's tasks.
Regards,
Lily

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 2,132 Views