miracle-as / AWX-RPM

4 stars 0 forks source link

ansible-galaxy -fr roles/requirements.yml doesn't work #16

Closed ITslacker closed 2 years ago

ITslacker commented 2 years ago

When I try to run the above command, this is what it returns:

[awxuser@vm-dev-awx-01 awx-turnkey]$ ansible-galaxy -fr roles/requirements.yml
usage: ansible-galaxy role [-h] ROLE_ACTION ...
ansible-galaxy role: error: argument ROLE_ACTION: invalid choice: 'roles/requirements.yml' (choose from 'init', 'remove', 'delete', 'list', 'search', 'import', 'setup', 'info', 'install')

usage: ansible-galaxy [-h] [--version] [-v] TYPE ...

Perform various Role and Collection related operations.

positional arguments:
  TYPE
    collection   Manage an Ansible Galaxy collection.
    role         Manage an Ansible Galaxy role.

optional arguments:
  --version      show program's version number, config file location, configured module search path, module location, executable location and exit
  -h, --help     show this help message and exit
  -v, --verbose  verbose mode (-vvv for more, -vvvv to enable connection debugging)

I tried inputting the absolute path with the same results. I'm following the install guide from awx-rpm installation

OS: RHEL 8.5

[awxuser@vm-dev-awx-01 awx-turnkey]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.5 (Ootpa)

Python Version:

[awxuser@vm-dev-awx-01 awx-turnkey]$ python3.9 -V
Python 3.9.6
[awxuser@vm-dev-awx-01 awx-turnkey]$ ansible --version
ansible [core 2.12.2]
  config file = None
  configured module search path = ['/home/awxuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
  ansible collection location = /home/awxuser/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.9.6 (default, Aug 11 2021, 06:39:25) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
  jinja version = 3.0.3
  libyaml = True
pankajps commented 2 years ago

The step where you say to update the role should use the command "ansible-galaxy install -fr roles/requirements.yml". Without the word install the command fails.

3 Check this