Hello everyone,
I installed redhat roles using dnf install rhel-system-roles command.
my roles_path= /usr/share/ansible/roles:/etc/ansible/roles:/home/user/roles
when i do ansible-galaxy list the roles exist.
but when i run the playbook i get this error
my code for the role is:
i even tried using it in roles section but it gives error with syntax-check even before i run the playbook.
I tried writing different syntax: rhel-system-roles.selinux but the same error.
Thanks
Get the output of the following:
ansible-galaxy collection list
ansible-galaxy list
If you installed from the RPM, it is from the collection or as the independent role depending on how you installed it. Keep in mind that roles and collections installed from RPM packages differ a little bit from a role installed directly using the Ansible Galaxy command. The error indicates it can't find the role, so I would try the above commands and I would also list out the directory
/usr/share/ansible/roles/ (where the RPM will install)
rhel-system-roles.selinux (Independent Role name)
or
redhat.rhel_system_roles.selinxrhel-system-roles.selinux (FQCN)
Get the output of the following:
ansible-galaxy collection list
ansible-galaxy list
If you installed from the RPM, it is from the collection or as the independent role depending on how you installed it. Keep in mind that roles and collections installed from RPM packages differ a little bit from a role installed directly using the Ansible Galaxy command. The error indicates it can't find the role, so I would try the above commands and I would also list out the directory
/usr/share/ansible/roles/ (where the RPM will install)
rhel-system-roles.selinux (Independent Role name)
or
redhat.rhel_system_roles.selinxrhel-system-roles.selinux (FQCN)
Hi @Travis
Thanks for your reply i downloaded the role using dnf install rhel-system-roles.
for the command of ansible-galaxy list the remainig roles aren't shown in the picture but rhel-system-roles.selinux exists.
sorry the output doesn't fit into single picture.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.