problem while running role

58 views
Skip to first unread message

Ashir

unread,
Feb 11, 2022, 8:56:20 AM2/11/22
to ansible...@googlegroups.com
module_stdout": "\r\nTraceback (most recent call last):\r\n  File \"/tmp/ansible_dfQNUM/ansible_module_setup.py\", line 139, in <module>\r\n    main()\r\n  File \"/tmp/ansible_dfQNUM/ansible_module_setup.py\", line 131, in main\r\n    data = get_all_facts(module)\r\n  File \"/tmp/ansible_dfQNUM/ansible_modlib.zip/ansible/module_utils/facts.py\", line 4031, in get_all_facts\r\n  File \"/tmp/ansible_dfQNUM/ansible_modlib.zip/ansible/module_utils/facts.py\", line 3974, in ansible_facts\r\n  File \"/tmp/ansible_dfQNUM/ansible_modlib.zip/ansible/module_utils/facts.py\", line 1072, in populate\r\n  File \"/tmp/ansible_dfQNUM/ansible_modlib.zip/ansible/module_utils/facts.py\", line 1605, in get_lvm_facts\r\nIndexError: list index out of range\r\n", "msg": "MODULE FAILURE", "rc": 0}
        
-- Ashir

Dick Visser

unread,
Feb 11, 2022, 9:31:16 AM2/11/22
to ansible...@googlegroups.com
Can there be even less information in your message?

I only see one huge line with an error.
I'm guessing you want to get rid of it. If so, then you should provide
much more information:

- what you're trying to do
- playbook/inventory code
- output of "ansible --version"

On Fri, 11 Feb 2022 at 14:56, Ashir <ashiru...@gmail.com> wrote:
>
> module_stdout": "\r\nTraceback (most recent call last):\r\n File \"/tmp/ansible_dfQNUM/ansible_module_setup.py\", line 139, in <module>\r\n main()\r\n File \"/tmp/ansible_dfQNUM/ansible_module_setup.py\", line 131, in main\r\n data = get_all_facts(module)\r\n File \"/tmp/ansible_dfQNUM/ansible_modlib.zip/ansible/module_utils/facts.py\", line 4031, in get_all_facts\r\n File \"/tmp/ansible_dfQNUM/ansible_modlib.zip/ansible/module_utils/facts.py\", line 3974, in ansible_facts\r\n File \"/tmp/ansible_dfQNUM/ansible_modlib.zip/ansible/module_utils/facts.py\", line 1072, in populate\r\n File \"/tmp/ansible_dfQNUM/ansible_modlib.zip/ansible/module_utils/facts.py\", line 1605, in get_lvm_facts\r\nIndexError: list index out of range\r\n", "msg": "MODULE FAILURE", "rc": 0}
>
> -- Ashir
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACnHHvZ2cNMjJWxfUfUN9keVXhSmWfn1g9OKf671_%2B3tRP2Ong%40mail.gmail.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Sk Ashir uddin

unread,
Feb 12, 2022, 12:48:05 PM2/12/22
to Ansible Project
 I just try to run the ansible setup command I get this error, or I preciously can say this error " line 1605, in get_lvm_facts" and ansible version is 2.4.7.
 -- ashi

Dick Visser

unread,
Feb 12, 2022, 12:58:30 PM2/12/22
to ansible...@googlegroups.com
On Sat, 12 Feb 2022 at 18:48, Sk Ashir uddin <ashiru...@gmail.com> wrote:
>
> I just try to run the ansible setup command I get this error, or I preciously can say this error " line 1605, in get_lvm_facts" and ansible version is 2.4.7.

AFAIK there has never been a version 2.4.7.
Also that is not what I asked.

> On Friday, 11 February 2022 at 20:01:16 UTC+5:30 dick....@geant.org wrote:
>>
>> Can there be even less information in your message?
>>
>> I only see one huge line with an error.
>> I'm guessing you want to get rid of it. If so, then you should provide
>> much more information:
>>
>> - what you're trying to do
>> - playbook/inventory code
>> - output of "ansible --version"

This is what I asked.

So, please post the output of "ansible --version"

Sk Ashir uddin

unread,
Feb 12, 2022, 1:05:44 PM2/12/22
to Ansible Project

The output of "ansible --version"

 ansible --version
ansible 2.4.0 (devel a06014663c) last updated 2017/04/18 12:36:51 (GMT +000)
  config file = /opt/ansible/config/ansible.cfg
  configured module search path = [u'/opt/ansible/library']
  ansible python module location = /opt/ansible/lib/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]

Dick Visser

unread,
Feb 12, 2022, 2:08:29 PM2/12/22
to ansible...@googlegroups.com
Did this archeological setup work before?


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Sk Ashir uddin

unread,
Feb 12, 2022, 11:08:04 PM2/12/22
to Ansible Project
Yes!!, it's worked on many env but gets this error while ansible tries to gather facts on the host.

"line 1605, in get_lvm_facts\r\nIndexError: list index out of range"

--ashir

Rilindo Foster

unread,
Feb 13, 2022, 12:18:43 AM2/13/22
to ansible...@googlegroups.com
1) you may want to upgrade your versions of Ansible - and Python, for that matter.

2) if it is only happening on a single host, it makes me wonder if LVM is even installed on that host.

- Rilindo

On Feb 12, 2022, at 10:08 PM, Sk Ashir uddin <ashiru...@gmail.com> wrote:

Yes!!, it's worked on many env but gets this error while ansible tries to gather facts on the host.

Dick Visser

unread,
Feb 13, 2022, 2:55:57 AM2/13/22
to ansible...@googlegroups.com
Ok so this happens only when deploying to a specific host?
Obviously that is where the problem is likely is then. 
If the other hosts don't have this issue, you could reinstall the problematic host, or replace it entirely. 


Nico Kadel-Garcia

unread,
Feb 13, 2022, 5:38:13 AM2/13/22
to ansible...@googlegroups.com
On Sun, Feb 13, 2022 at 12:18 AM Rilindo Foster <ril...@gmail.com> wrote:
>
> 1) you may want to upgrade your versions of Ansible - and Python, for that matter.
>
> 2) if it is only happening on a single host, it makes me wonder if LVM is even installed on that host.
>
> - Rilindo

Upgrading python is a bit more of an adventure. Having multiple bits
of different ansible installations, and different pythons, is a great
way to create debugging messes. So is having different pythons and
different ansible bits on different remote hosts. I'd encourage making
sure that all your ansible servers and remote servers have
/usr/bin/python3 working.

It's why, for the RPM building tools I publish, I go ahead and replace
'#!/usr/bin/python" and "#!/usr/bin/env python" Everywhere with
'#!/usr/bin/python3', as part of the '%setup' stanza, and why I'd
discourage the use of "pip install ansible". "#!/usr/bin/python"
yields python2 on some systems, and that way lies madness.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/556B5E15-5310-4FDF-BD05-F16787D06B5D%40gmail.com.
Reply all
Reply to author
Forward
0 new messages