[ansible-galaxy][manalize] I can't choose to don't use `alt-galaxy`
Kocal opened this issue · 1 comments
Hi,
Some context
Inside a configuration created by Manalize, I'm trying to configure ansible-galaxy to download a role dependency from a private GitLab repository.
But it does not work with alt-galaxy
, so I want to use ansible-galaxy
:
Use of git or hg is not supported.
What I've tried
I've tried to define manala_ansible_galaxy_bin
variable with ansible-galaxy
but it does not do anything, it still use alt-galaxy
.
This is my ansible/ansible.yml
file:
---
# App
- hosts: app
vars:
manala_ansible_galaxy_roles:
- manala.ansible_galaxy
- manala.deploy
- manala.skeleton
roles:
- manala.ansible_galaxy
# Global
- hosts: all
vars:
+ manala_ansible_galaxy_bin: 'ansible-galaxy' # we can't install a git private repo with alt-galaxy binary
manala_ansible_galaxy_roles_path: "{{ playbook_dir }}/roles"
manala_ansible_galaxy_roles:
- manala.ansible_galaxy
- manala.deploy
+ - src: 'git@gitlab.com:<repo user>/<repo name>.git'
+ scm: git
roles:
- manala.ansible_galaxy
The previous steps about alt-galaxy
are skipped, so it should not change manala_ansible_galaxy_bin
variable value (https://github.com/manala/ansible-roles/blob/master/manala.ansible_galaxy/tasks/alternatives.yml#L12).
### Possible solution
Also, note that if I modify the App
configuration (instead of Global
configuration), then it correctly use ansible-galaxy
binary:
It still fails but for an other reason, the user root
has no permission to clone my private repository.
But I don't want this solution because:
- I want my downloaded role to be in
/srv/app/ansible/roles
I don't want to deal with root and cloning permission issue, I want my user(well I still have cloning permission issue withapp
to clone the repoapp
user 😝 )
Actual workaround
Using a classic requirements.yml
file and executing ansible-galaxy
manually.
So my question is, is there a way to use ansible-galaxy
for the Global
configuration?
Am I missing something?
Thanks 😄