1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

ansible_galaxy_install - minor documentation fix (#3804) (#3813)

* ansible_galaxy_install - minor documentation fix

* further adjustments

(cherry picked from commit 49bdc0f218)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2021-11-30 06:52:55 +01:00 committed by GitHub
parent 491196937d
commit a11022e896
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ __metaclass__ = type
DOCUMENTATION = """ DOCUMENTATION = """
module: ansible_galaxy_install module: ansible_galaxy_install
author: author:
- "Alexei Znamensky (@russoz)" - "Alexei Znamensky (@russoz)"
short_description: Install Ansible roles or collections using ansible-galaxy short_description: Install Ansible roles or collections using ansible-galaxy
version_added: 3.5.0 version_added: 3.5.0
description: description:
@ -24,44 +24,46 @@ requirements:
options: options:
type: type:
description: description:
- The type of installation performed by C(ansible-galaxy). - The type of installation performed by C(ansible-galaxy).
- If I(type) is C(both), then I(requirements_file) must be passed and it may contain both roles and collections. - If I(type) is C(both), then I(requirements_file) must be passed and it may contain both roles and collections.
- "Note however that the opposite is not true: if using a I(requirements_file), then I(type) can be any of the three choices." - "Note however that the opposite is not true: if using a I(requirements_file), then I(type) can be any of the three choices."
- "B(Ansible 2.9): The option C(both) will have the same effect as C(role)." - "B(Ansible 2.9): The option C(both) will have the same effect as C(role)."
type: str type: str
choices: [collection, role, both] choices: [collection, role, both]
required: true required: true
name: name:
description: description:
- Name of the collection or role being installed. - Name of the collection or role being installed.
- Versions can be specified with C(ansible-galaxy) usual formats. For example, C(community.docker:1.6.1) or C(ansistrano.deploy,3.8.0). - >
- I(name) and I(requirements_file) are mutually exclusive. Versions can be specified with C(ansible-galaxy) usual formats.
For example, the collection C(community.docker:1.6.1) or the role C(ansistrano.deploy,3.8.0).
- I(name) and I(requirements_file) are mutually exclusive.
type: str type: str
requirements_file: requirements_file:
description: description:
- Path to a file containing a list of requirements to be installed. - Path to a file containing a list of requirements to be installed.
- It works for I(type) equals to C(collection) and C(role). - It works for I(type) equals to C(collection) and C(role).
- I(name) and I(requirements_file) are mutually exclusive. - I(name) and I(requirements_file) are mutually exclusive.
- "B(Ansible 2.9): It can only be used to install either I(type=role) or I(type=collection), but not both at the same run." - "B(Ansible 2.9): It can only be used to install either I(type=role) or I(type=collection), but not both at the same run."
type: path type: path
dest: dest:
description: description:
- The path to the directory containing your collections or roles, according to the value of I(type). - The path to the directory containing your collections or roles, according to the value of I(type).
- > - >
Please notice that C(ansible-galaxy) will not install collections with I(type=both), when I(requirements_file) Please notice that C(ansible-galaxy) will not install collections with I(type=both), when I(requirements_file)
contains both roles and collections and I(dest) is specified. contains both roles and collections and I(dest) is specified.
type: path type: path
force: force:
description: description:
- Force overwriting an existing role or collection. - Force overwriting an existing role or collection.
- Using I(force=true) is mandatory when downgrading. - Using I(force=true) is mandatory when downgrading.
- "B(Ansible 2.9 and 2.10): Must be C(true) to upgrade roles and collections." - "B(Ansible 2.9 and 2.10): Must be C(true) to upgrade roles and collections."
type: bool type: bool
default: false default: false
ack_ansible29: ack_ansible29:
description: description:
- Acknowledge using Ansible 2.9 with its limitations, and prevents the module from generating warnings about them. - Acknowledge using Ansible 2.9 with its limitations, and prevents the module from generating warnings about them.
- This option is completely ignored if using a version Ansible greater than C(2.9.x). - This option is completely ignored if using a version of Ansible greater than C(2.9.x).
type: bool type: bool
default: false default: false
""" """
@ -114,9 +116,9 @@ RETURN = """
returned: always returned: always
installed_roles: installed_roles:
description: description:
- If I(requirements_file) is specified instead, returns dictionary with all the roles installed per path. - If I(requirements_file) is specified instead, returns dictionary with all the roles installed per path.
- If I(name) is specified, returns that role name and the version installed per path. - If I(name) is specified, returns that role name and the version installed per path.
- "B(Ansible 2.9): Returns empty because C(ansible-galaxy) has no C(list) subcommand." - "B(Ansible 2.9): Returns empty because C(ansible-galaxy) has no C(list) subcommand."
type: dict type: dict
returned: always when installing roles returned: always when installing roles
contains: contains:
@ -131,9 +133,9 @@ RETURN = """
ansistrano.deploy: 3.8.0 ansistrano.deploy: 3.8.0
installed_collections: installed_collections:
description: description:
- If I(requirements_file) is specified instead, returns dictionary with all the collections installed per path. - If I(requirements_file) is specified instead, returns dictionary with all the collections installed per path.
- If I(name) is specified, returns that collection name and the version installed per path. - If I(name) is specified, returns that collection name and the version installed per path.
- "B(Ansible 2.9): Returns empty because C(ansible-galaxy) has no C(list) subcommand." - "B(Ansible 2.9): Returns empty because C(ansible-galaxy) has no C(list) subcommand."
type: dict type: dict
returned: always when installing collections returned: always when installing collections
contains: contains: