question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ansible-galaxy should support git+ssh urls.

See original GitHub issue

The examples given for ansible-galaxy imply that it can fetch roles via git+ssh.

However, supplying such a url causes it to fetch from https://galaxy.ansible.com and fail if the role is not found there.

It would be convenient, for use-cases where publishing via galaxy.ansible.com is prohibited or inconvenient, for ansible-galaxy to have the capability of fetching roles via the git+ssh protocol.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ubuntu811commented, Jun 3, 2022

I’m trying this exactly like that today, but it’s trying to get the repo from the galaxy:

  - name: company.collection
    src: git@gitlab.our.domain:path/to/repo/collection.git
    version: 'main'
    scm: git

This is the verbose output of /usr/local/bin/ansible-galaxy collection install -vvvv -p /usr/local/lib -r ansible_collections/requirements.yml

Collection requirement 'company.collection' is the name of a collection
Collection 'company.collection' is not available from server default https://galaxy.ansible.com/api/
ERROR! Failed to find collection company.collection:main

I’m officially confused…

0reactions
ironfroggycommented, Jan 8, 2019

@pillarsdotnet glad this could get cleared up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ansible-galaxy and git clone from Bitbucket.org - Stack Overflow
Maybe the scp syntax does not work. The url one might: ssh://git@bitbucket.org/myrepo/nginx.git. Try, as in this ansible issue: Direct copy from github ......
Read more >
Galaxy User Guide - Ansible Documentation
Embedding credentials into a git URI is not secure. Use safe authentication options to prevent your credentials from being exposed in logs or...
Read more >
Installing content — Ansible Documentation
The source of the role, and a required attribute. Specify a role from Galaxy by using the format namespace. role_name, or provide a...
Read more >
Distributing collections - Ansible Documentation
Review the version number in your galaxy.yml file. Each time you publish your collection, it must have a new version number. · Run...
Read more >
Galaxy User Guide - Ansible Documentation
You can use the ansible-galaxy collection install command to install a ... using git+ssh - src: git@gitlab.company.com:mygroup/ansible-base.git scm: git ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found