Skip to content

Commit 1d8e851

Browse files
Add example around ansible-galaxy command (#1053)
Co-authored-by: Don Naro <[email protected]>
1 parent 7547d43 commit 1d8e851

File tree

1 file changed

+36
-7
lines changed

1 file changed

+36
-7
lines changed

docs/docsite/rst/command_guide/cheatsheet.rst

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,49 @@ See :ref:`ansible-playbook` for detailed documentation.
3535
ansible-galaxy
3636
==============
3737

38-
Installing a collection:
38+
Installing collections
39+
^^^^^^^^^^^^^^^^^^^^^^
40+
41+
* Install a single collection:
3942

4043
.. code-block:: bash
4144
42-
ansible-galaxy collection install mynamespace.mycollection
45+
ansible-galaxy collection install mynamespace.mycollection
4346
44-
Downloads ``mynamespace.mycollection`` from the configured Galaxy server (`<galaxy.ansible.com>`_ by default).
45-
47+
Downloads ``mynamespace.mycollection`` from the configured Galaxy server (`galaxy.ansible.com` by default).
4648

47-
Listing all installed collections:
49+
* Install a list of collections:
4850

4951
.. code-block:: bash
5052
51-
ansible-galaxy collection list
53+
ansible-galaxy collection install -r requirements.yml
5254
53-
See :ref:`ansible-galaxy` for detailed documentation.
55+
Downloads the list of collections specified in the ``requirements.yml`` file.
56+
57+
* List all installed collections:
58+
59+
.. code-block:: bash
60+
61+
ansible-galaxy collection list
62+
63+
Installing roles
64+
^^^^^^^^^^^^^^^^
65+
66+
* Install a role named `example.role`:
67+
68+
.. code-block:: bash
69+
70+
ansible-galaxy role install example.role
71+
72+
# SNIPPED_OUTPUT
73+
- extracting example.role to /home/user/.ansible/roles/example.role
74+
- example.role was installed successfully
75+
76+
77+
* List all installed roles:
5478

79+
.. code-block:: bash
80+
81+
ansible-galaxy role list
82+
83+
See :ref:`ansible-galaxy` for detailed documentation.

0 commit comments

Comments
 (0)