Open alexppg opened 7 years ago
Actually, I first tried symlinking them to other paths that worked and still didn't worked, but I've just tried plain copy and it worked.
You have to install the roles to the 'roles' folder in base_path
(the project's root directory). Or, add them to requirements.yml
, so that they get installed into the conductor. Or, use --roles-path
to mount an external path (one outside of your project) to the conductor.
Did you try any of these?
Yeah, because builds are being executed in a containerized environment, symlinks to paths outside of the project path or to absolute paths within the project path won't do what you think they'd do.
When copied on the same path, in the requirements.yml or using --roles-path
, it works as expected.
But when using none of them, the paths where it searches for roles is ./roles:/src/roles:/etc/ansible/roles:
(on the host, not on the conductor), as you can see on the above error. If it's correct that it doesn't search /etc/ansible/roles
, then maybe that path could be removed from the error? It makes you think that it's not finding them.
ISSUE TYPE
container.yml
OS / ENVIRONMENT
SUMMARY
Ansible-container doesn't detect some galaxy roles. I can't find a pattern on why this happens.
STEPS TO REPRODUCE
First install some galaxy roles. I've tried with:
For some reason, it worked as expected with the role bennojoy.mysql, but only when changing the roles section on the container.yml file. Instead of using the bennojoy.mysql, it must be used
mysql
:To reproduce it just install the roles with standard
ansible-galaxy install franklinkim.nginx
and execute ansible-container.EXPECTED RESULTS
It should detect the roles.
ACTUAL RESULTS
PD: I tried changing the roles to other paths I know for sure are detected and still the same.