Improve documentation on requirements.yml (#76140)

Makes it clear that user can use range identifiers with collection
versions inside requirements.yml files.
pull/79835/head
Sorin Sbarnea 3 years ago committed by GitHub
parent 65eb5c0a9f
commit 44dcfde9b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -330,12 +330,12 @@ You can install roles and collections from the same requirements files
roles: roles:
# Install a role from Ansible Galaxy. # Install a role from Ansible Galaxy.
- name: geerlingguy.java - name: geerlingguy.java
version: 1.9.6 version: "1.9.6" # note that ranges are not supported for roles
collections: collections:
# Install a collection from Ansible Galaxy. # Install a collection from Ansible Galaxy.
- name: geerlingguy.php_roles - name: geerlingguy.php_roles
version: 0.9.3 version: ">=0.9.3"
source: https://galaxy.ansible.com source: https://galaxy.ansible.com
Installing multiple roles from multiple files Installing multiple roles from multiple files

@ -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 # With the collection name, version, and source options
- name: my_namespace.my_other_collection - name: my_namespace.my_other_collection
version: 'version range identifiers (default: ``*``)' version: ">=1.2.0" # Version range identifiers (default: ``*``)
source: 'The Galaxy URL to pull the collection from (default: ``--api-server`` from cmdline)' source: ... # The Galaxy URL to pull the collection from (default: ``--api-server`` from cmdline)
You can specify the following keys for each collection entry: 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: roles:
# Install a role from Ansible Galaxy. # Install a role from Ansible Galaxy.
- name: geerlingguy.java - name: geerlingguy.java
version: 1.9.6 version: "1.9.6" # note that ranges are not supported for roles
collections: collections:
# Install a collection from Ansible Galaxy. # Install a collection from Ansible Galaxy.
- name: geerlingguy.php_roles - name: geerlingguy.php_roles
version: 0.9.3 version: ">=0.9.3"
source: https://galaxy.ansible.com source: https://galaxy.ansible.com
To install both roles and collections at the same time with one command, run the following: To install both roles and collections at the same time with one command, run the following:

Loading…
Cancel
Save