diff options
author | Sorin Sbarnea <ssbarnea@redhat.com> | 2023-01-26 22:08:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-26 17:08:59 -0500 |
commit | 44dcfde9b84177e7dfede11ab287789c577b82b5 (patch) | |
tree | b3c71e972b2b7c1c0e0b5003380ba809c1c83fec /docs | |
parent | 65eb5c0a9f4ecf0f358c5c81f9c9e3202a0fde41 (diff) | |
download | ansible-44dcfde9b84177e7dfede11ab287789c577b82b5.tar.gz |
Improve documentation on requirements.yml (#76140)
Makes it clear that user can use range identifiers with collection
versions inside requirements.yml files.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docsite/rst/galaxy/user_guide.rst | 4 | ||||
-rw-r--r-- | docs/docsite/rst/shared_snippets/installing_multiple_collections.txt | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/docs/docsite/rst/galaxy/user_guide.rst b/docs/docsite/rst/galaxy/user_guide.rst index e4beb7ef82..c5a1e19e8f 100644 --- a/docs/docsite/rst/galaxy/user_guide.rst +++ b/docs/docsite/rst/galaxy/user_guide.rst @@ -330,12 +330,12 @@ You can install roles and collections from the same requirements files roles: # Install a role from Ansible Galaxy. - name: geerlingguy.java - version: 1.9.6 + version: "1.9.6" # note that ranges are not supported for roles collections: # Install a collection from Ansible Galaxy. - name: geerlingguy.php_roles - version: 0.9.3 + version: ">=0.9.3" source: https://galaxy.ansible.com Installing multiple roles from multiple files diff --git a/docs/docsite/rst/shared_snippets/installing_multiple_collections.txt b/docs/docsite/rst/shared_snippets/installing_multiple_collections.txt index c8cca8b48b..a1b18b5937 100644 --- a/docs/docsite/rst/shared_snippets/installing_multiple_collections.txt +++ b/docs/docsite/rst/shared_snippets/installing_multiple_collections.txt @@ -10,8 +10,8 @@ You can set up a ``requirements.yml`` file to install multiple collections in on # With the collection name, version, and source options - name: my_namespace.my_other_collection - version: 'version range identifiers (default: ``*``)' - source: 'The Galaxy URL to pull the collection from (default: ``--api-server`` from cmdline)' + version: ">=1.2.0" # Version range identifiers (default: ``*``) + source: ... # The Galaxy URL to pull the collection from (default: ``--api-server`` from cmdline) You can specify the following keys for each collection entry: @@ -56,12 +56,13 @@ You can also add roles to a ``requirements.yml`` file, under the ``roles`` key. roles: # Install a role from Ansible Galaxy. - name: geerlingguy.java - version: 1.9.6 + version: "1.9.6" # note that ranges are not supported for roles + collections: # Install a collection from Ansible Galaxy. - name: geerlingguy.php_roles - version: 0.9.3 + version: ">=0.9.3" source: https://galaxy.ansible.com To install both roles and collections at the same time with one command, run the following: |