Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ansible-galaxy][manalize] I can't choose to don't use alt-galaxy #360

Closed
Kocal opened this issue Aug 16, 2019 · 1 comment
Closed

[ansible-galaxy][manalize] I can't choose to don't use alt-galaxy #360

Kocal opened this issue Aug 16, 2019 · 1 comment

Comments

@Kocal
Copy link
Contributor

Kocal commented Aug 16, 2019

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

Capture d’écran de 2019-08-16 11-07-07

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:
Capture d’écran de 2019-08-16 11-05-17

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 app to clone the repo (well I still have cloning permission issue with app 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 😄

@Kocal Kocal changed the title [ansible-galaxy] I can't choose to don't use alt-galaxy [ansible-galaxy][manalize} I can't choose to don't use alt-galaxy Aug 16, 2019
@Kocal Kocal changed the title [ansible-galaxy][manalize} I can't choose to don't use alt-galaxy [ansible-galaxy][manalize] I can't choose to don't use alt-galaxy Aug 16, 2019
@Kocal
Copy link
Contributor Author

Kocal commented Aug 11, 2020

I guess this is not an issue anymore since alt-galaxy has been removed in 4.0.7 🎉

@Kocal Kocal closed this as completed Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant