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

Provide galaxy.yml for this repo to work with ansible-galaxy #198

Closed
zeidoo opened this issue Jan 7, 2023 · 1 comment
Closed

Provide galaxy.yml for this repo to work with ansible-galaxy #198

zeidoo opened this issue Jan 7, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@zeidoo
Copy link

zeidoo commented Jan 7, 2023

Expected Behavior

Thank you for this repo and your videos! It's really helpful!

Would be nice if we could install this repo with ansible galaxy. The ansible docs state that there needs to be an galaxy.yml file in the repo. [1, 2]

Please note that I would do a PR, but, I'm not sure of what to put in it. I've attached a sample at the bottom of this issue though.

Steps to Reproduce

User requirements.yml:

collections:
  - name: technotim.k3s
    source: https://github.com/techno-tim/k3s-ansible
    type: git

$ ansible-galaxy install -r ./collections/requirements.yml

ERROR! Neither the collection requirement entry key 'name', nor 'source' point to a concrete resolvable collection artifact. Also 'name' is not an FQCN. A valid collection name must be in the format .. Please make sure that the namespace and the collection name contain characters from [a-zA-Z0-9_] only.

Tip: Make sure you are pointing to the right subdirectory — some temp folder looks like a directory but it is neither a collection, nor a namespace dir.

[1] https://docs.ansible.com/ansible/latest/galaxy/user_guide.html
[2] https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html)

Sample galaxy.yml

namespace: "technotim"
name: "k3s"
version: "<todo>"
readme: "README.md"
authors:
    - "Techno Tim <insert your links here>"
dependencies:
    "other_namespace.collection1": ">=1.0.0"
    "other_namespace.collection2": ">=2.0.0,<3.0.0"
    "anderson55.my_collection": "*"    # note: "*" selects the highest version available
license:
    - "MIT"
tags:
    - demo
    - collection
repository: "https://github.com/techno-tim/k3s-ansible/"
@berendt
Copy link
Contributor

berendt commented Jul 20, 2023

That would really be an added value if you could install the roles via Galaxy independently of Github. This makes it much easier to use (at least for us with our workflows).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants