NETWAYS / ansible-collection-elasticstack

A collection to install and manage the Elastic Stack
GNU General Public License v3.0
9 stars 8 forks source link

Has something changed with ansible galaxy? #206

Closed stevedwray closed 1 year ago

stevedwray commented 1 year ago

Is this a typo or something in your instructions? The very first command fails: steve@EXE:~/workspace/ansible/vm-prep$ ansible-galaxy collection install https://github.com/netways/ansible-collection-elasticstack.git Downloading https://github.com/netways/ansible-collection-elasticstack.git to /home/steve/.ansible/tmp/ansible-local-4826huprjt81/tmpqfmbqeml/ansible-collection-elasticst-6fj14m0k ERROR! Collection artifact at '/home/steve/.ansible/tmp/ansible-local-4826huprjt81/tmpqfmbqeml/ansible-collection-elasticst-6fj14m0k/ansible-collection-elasticstack.git' is not a valid tar file.

martialblog commented 1 year ago

Hi,

the ansible-galaxy command expects the name of the role/collection and looks for it at https://galaxy.ansible.com/

If you want to download something via git you have to prefix the URL with git+

ansible-galaxy collection install git+https://github.com/netways/ansible-collection-elasticstack.git

Alternatively, you can specify downloads in a YAML file (again with type git):

collections:
  - name: https://github.com/organization/repo_name.git
    type: git
    version: devel

https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html

stevedwray commented 1 year ago

Great, I didn't know that. So the documentation does have a typo: ansible-galaxy collection install https://github.com/netways/ansible-collection-elasticstack.git

martialblog commented 1 year ago

Indeed. That should be fixed!

Thanks for the hint!