cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Sitikantha Mission Specialist
Mission Specialist

I am not getting the output for ansible_lvm fact variable

can anyone help me ???

sitikantha_mishra
Labels (1)
0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator

Re: Ansible

Jump to solution

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!

0 Kudos
Reply
Loading...
1 Reply
Moderator
Moderator

Re: Ansible

Jump to solution

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!

0 Kudos
Reply
Loading...
Join the conversation
You must log in to join this conversation.