PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, November 10, 2022

[FIXED] Why is my logical volume not showing in the ansible_lvm variable?

 November 10, 2022     ansible, ansible-facts, linux, redhat     No comments   

Issue

I have created a playbook to add a volume group (vg.services) and logical volume (lv_new). This results in the specified VG and LV being created as confirmed by the lsblk command:

[root@serverb student]# lsblk 
vda 
|---vda1 
|----vda2 
|----vda3 
vdb 
|--**vg.services-lv_new**

but when I query the ansible facts I get nothing back:

ansible serverb -m setup -a "filter=ansible_lvm"

serverb | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/libexec/platform-python"
    },
    "changed": false

what is going wrong here?


Solution

According ansible/lib/ansible/module_utils/facts/hardware/linux.py and Ansible Issue #17393

"if running as root and lvm utils are available"

you need to have high rights like root or become: true, as well LVM utils installed, otherwise

"gather_facts silently skips lvm facts if lvm pkg not installed"



Answered By - U880D
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing