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

add ansible-galaxy to command cheatsheet #826

Merged
merged 4 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/docsite/rst/command_guide/cheatsheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,26 @@ Loads ``my_playbook.yml`` from the current working directory and:

See :ref:`ansible-playbook` for detailed documentation.


ansible-galaxy
==============

Installing a collection:

.. code-block:: bash

ansible-galaxy collection install mynamespace.mycollection -p /path/to/collections --force-all-deps
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just showcase the simple ansible-galaxy collection install command without extra options? I don't think most users will need -p or --force-all-deps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I thought maybe it was just the simple command, but I saw a few examples using the -p in the forum so wasn't sure. I can remove that stuff.

samccann marked this conversation as resolved.
Show resolved Hide resolved

Downloads ``mynamespace.mycollection`` from the configured Galaxy server (`<galaxy.ansible.com>`_ by default) and :
samccann marked this conversation as resolved.
Show resolved Hide resolved
- ``-p`` - installs the collection to `/path/to/collections` (``~/.ansible/collections`` by default if this flag is not included).
samccann marked this conversation as resolved.
Show resolved Hide resolved
- ``--force-with-deps`` - overwrites any existing collection and dependencies.
samccann marked this conversation as resolved.
Show resolved Hide resolved


Listing all installed collections:

.. code-block:: bash

ansible-galaxy collection list

See :ref:`ansible-galaxy` for detailed documentation.