
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 5,474 Views
I am not getting the output for ansible_lvm fact variable
can anyone help me ???
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 5,471 Views
What command are you using? Are there any LVs on the managed host? If not, the command fails.
I ran the following command from my Mac where I am using ansible 2.8.3 using my tower instance as a managed host.
[rgdacosta@Ricardos-MacBook-Pro scratch ]$ ansible tower -m setup -a filter=ansible_lvm tower | SUCCESS => { "ansible_facts": { "ansible_lvm": { "lvs": { "lv_home": { "size_g": "11.54", "vg": "VolGroup" }, "lv_root": { "size_g": "50.00", "vg": "VolGroup" }, "lv_swap": { "size_g": "1.97", "vg": "VolGroup" } }, "pvs": { "/dev/sda2": { "free_g": "0", "size_g": "63.51", "vg": "VolGroup" } }, "vgs": { "VolGroup": { "free_g": "0", "num_lvs": "3", "num_pvs": "1", "size_g": "63.51" } } }, "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": false }
----------------------------------------------------------------------------------
If you're satisfied with the solutions provided please mark the solution as ACCEPTED.
Don't forget to thank those who helped you out with kudos!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 5,472 Views
What command are you using? Are there any LVs on the managed host? If not, the command fails.
I ran the following command from my Mac where I am using ansible 2.8.3 using my tower instance as a managed host.
[rgdacosta@Ricardos-MacBook-Pro scratch ]$ ansible tower -m setup -a filter=ansible_lvm tower | SUCCESS => { "ansible_facts": { "ansible_lvm": { "lvs": { "lv_home": { "size_g": "11.54", "vg": "VolGroup" }, "lv_root": { "size_g": "50.00", "vg": "VolGroup" }, "lv_swap": { "size_g": "1.97", "vg": "VolGroup" } }, "pvs": { "/dev/sda2": { "free_g": "0", "size_g": "63.51", "vg": "VolGroup" } }, "vgs": { "VolGroup": { "free_g": "0", "num_lvs": "3", "num_pvs": "1", "size_g": "63.51" } } }, "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": false }
----------------------------------------------------------------------------------
If you're satisfied with the solutions provided please mark the solution as ACCEPTED.
Don't forget to thank those who helped you out with kudos!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 4,481 Views
become root than you will get lvm facts ;)
ansible]$ ansible servera -m setup -u root -b | grep lvs
"lvs": {
"num_lvs": "2",
"num_lvs": "2",