R
R
Roman Sokolov2021-09-28 09:54:27
Ansible
Roman Sokolov, 2021-09-28 09:54:27

How to install dependencies in AWX project?

I'm learning AWX. When I try to execute template, I get an error:

ERROR! couldn't resolve module/action 'community.crypto.openssl_dhparam'. This often indicates a misspelling, missing collection, or incorrect module path.

Created a requirements.yml file and placed it in the main directory and the roles directory, but community.crypto is not installed.
Contents of the requirements.yml file:
- src: https://github.com/ansible-collections/community.crypto

Here is the project sync output:
ok: [localhost] => {
    "msg": "Repository Version 26af1a8960efbdb61dd8fd732d96c75b94476203"
}
PLAY [Install content with ansible-galaxy command if necessary] ****************
TASK [Check content sync settings] *********************************************
skipping: [localhost]
TASK [meta] ********************************************************************
skipping: [localhost]
TASK [fetch galaxy roles from requirements.(yml/yaml)] *************************
[WARNING]: Unable to find '/var/lib/awx/projects/_9__load_balancing/roles' in
expected paths (use -vvvvv to see paths)
TASK [fetch galaxy collections from collections/requirements.(yml/yaml)] *******
[WARNING]: Unable to find
'/var/lib/awx/projects/_9__load_balancing/collections' in expected paths (use
-vvvvv to see paths)
PLAY RECAP *********************************************************************
localhost                  : ok=3    changed=1    unreachable=0    failed=0    skipped=3    rescued=0    ignored=0

What to do to get rid of warnings
[WARNING]: Unable to find '/var/lib/awx/projects/_9__load_balancing/roles' in
expected paths (use -vvvvv to see paths)
TASK [fetch galaxy collections from collections/requirements.(yml/yaml)] *******
[WARNING]: Unable to find
'/var/lib/awx/projects/_9__load_balancing/collections' in expected paths (use
-vvvvv to see paths)


And how to properly install dependencies from ansible-galaxy?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Sokolov, 2021-09-28
@jimquery

It's decided.
According to the documentation
, you need to create the roles directory in the root directory, not in the playbook directory.
Also, in the directory with the playbooks, I created the collections directory, the warnings disappeared.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question