I am not getting the output for ansible_lvm fact variable
can anyone help me ???
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!
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!
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",
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.