Skip to content

Commit

Permalink
Merge pull request #1135 from ansible/patchback/backports/stable-2.16…
Browse files Browse the repository at this point in the history
…/1d8e851c0fa0e44f66085ce679def62e74313add/pr-1053

[PR #1053/1d8e851c backport][stable-2.16] Add example around ansible-galaxy command
  • Loading branch information
oraNod authored Feb 21, 2024
2 parents 73f61c7 + 80a84f2 commit db4db28
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions docs/docsite/rst/command_guide/cheatsheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,49 @@ See :ref:`ansible-playbook` for detailed documentation.
ansible-galaxy
==============

Installing a collection:
Installing collections
^^^^^^^^^^^^^^^^^^^^^^

* Install a single collection:

.. code-block:: bash
ansible-galaxy collection install mynamespace.mycollection
ansible-galaxy collection install mynamespace.mycollection
Downloads ``mynamespace.mycollection`` from the configured Galaxy server (`<galaxy.ansible.com>`_ by default).

Downloads ``mynamespace.mycollection`` from the configured Galaxy server (`galaxy.ansible.com` by default).

Listing all installed collections:
* Install a list of collections:

.. code-block:: bash
ansible-galaxy collection list
ansible-galaxy collection install -r requirements.yml
See :ref:`ansible-galaxy` for detailed documentation.
Downloads the list of collections specified in the ``requirements.yml`` file.

* List all installed collections:

.. code-block:: bash
ansible-galaxy collection list
Installing roles
^^^^^^^^^^^^^^^^

* Install a role named `example.role`:

.. code-block:: bash
ansible-galaxy role install example.role
# SNIPPED_OUTPUT
- extracting example.role to /home/user/.ansible/roles/example.role
- example.role was installed successfully
* List all installed roles:

.. code-block:: bash
ansible-galaxy role list
See :ref:`ansible-galaxy` for detailed documentation.

0 comments on commit db4db28

Please sign in to comment.