community.zabbix icon indicating copy to clipboard operation
community.zabbix copied to clipboard

Unable to install zabbix_agent role CentOS 8.3.2011, ansible 2.9.17, AWX 17.0.1

Open marcusjfloyd opened this issue 3 years ago • 4 comments

This is spawning from #250. I don't have permissions to reopen it as requested so I had to start a new issue.

I get an error that roles aren't installed when I definitely installed them via awx projects which puts them in (/var/lib/awx/projects). I've google'd all around for this issue and have seen people on stackoverflow and reddit with this issue with no resolve. Thanks for any tips you might have to point me in the right direction:

`ansible-playbook 2.9.17 config file = /etc/ansible/ansible.cfg configured module search path = ['/var/lib/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.6/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] Using /etc/ansible/ansible.cfg as config file SSH password: BECOME password[defaults to SSH password]: setting up inventory plugins host_list declined parsing /tmp/awx_129_vkqydj49/tmpdpaksnnr as it did not pass its verify_file() method Parsed /tmp/awx_129_vkqydj49/tmpdpaksnnr inventory source with script plugin ERROR! the role 'zabbix_agent' was not found in /tmp/awx_129_vkqydj49/project/molecule/zabbix_agent/roles:/tmp/awx_129_vkqydj49/requirements_roles:/var/lib/awx/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/tmp/awx_129_vkqydj49/project/molecule/zabbix_agent The error appears to be in '/tmp/awx_129_vkqydj49/project/molecule/zabbix_agent/converge.yml': line 5, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be:

- role: zabbix_agent
                                                                            `

Originally posted by @marcusjfloyd in https://github.com/ansible-collections/community.zabbix/issues/250#issuecomment-778867983

marcusjfloyd avatar Feb 15 '21 00:02 marcusjfloyd

Hi @marcusjfloyd

No worries bro, we will just continue here with this issue. I am not familiar with AWX (But it seems that I have to go deep-diving into that though soon.. 😄), but it seems that you are importing or executing something from the molecule directory. Molecule is used as part of (our) CI tooling and spins up several Docker images and installs the roles into these Docker images to validate the role installation and execution. If someone makes a change, we can verify if this change would not destroy the execution of the role, as we aim that a default installation should always work.) I am not sure how (and even if that is possible) but from an AWX p.o.v., just try to ignore everything inside the molecule/ directory.

I'll try if I can find some time soon to do something with AWX, as you are not the first one having issues with the roles on AWX. So, until then: May the force be with you!

(I don't have a better answer right now, sorry!)

Kind regards, Werner

dj-wasabi avatar Feb 15 '21 07:02 dj-wasabi

No worries man. Thanks for the work you've put in on this. "dj wasabi" came up everywhere when I was looking at this issue so just giving credit where it's due. Turns out AWX will only pickup the yaml files from a collection if they have the playbook structure.

It might take me a while, but if you want, I can fork and see if I can come up with some playbooks that are suitable for AWX. If there's anything else I can do to help, just let me know.

marcusjfloyd avatar Feb 16 '21 19:02 marcusjfloyd

I ran into almost a similar issue, syncing inventory from Zabbix. It turns out zabbix-api was missing from the awx_task container. I installed it with pip3 install zabbix-api and everything is running normally since then.

Note: I didn't have this issue until upgraded from AWX 14.1.0 to 17.1.0

Cadjoe avatar Jun 23 '21 15:06 Cadjoe

@marcusjfloyd is this something that is still happening to you? Have you perhaps had a chance to upgrade to ansible >= 2.10 to see if the issue persists?

D3DeFi avatar Oct 31 '21 07:10 D3DeFi

@marcusjfloyd is this still a problem or can this be closed?

pyrodie18 avatar Aug 31 '22 22:08 pyrodie18

No Reply....Closing

pyrodie18 avatar Sep 12 '22 23:09 pyrodie18