ansible.star¶
Bump Ansible role and collection versions in requirements files.
Edits are line-based, so comments and layout stay as they were.
| Function | What it does |
|---|---|
requirements |
Lists the repo's Ansible Galaxy requirements files. |
set_version |
Sets the version of a role or collection wherever a requirements file lists it. |
requirements¶
Lists the repo's Ansible Galaxy requirements files.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
Returns: The sorted paths of every requirements.yml or requirements.yaml, including those under roles/ and collections/.
Example
set_version¶
Sets the version of a role or collection wherever a requirements file lists it.
A newer version already there is kept, so a campaign never lowers one.
Entries are matched by name, and for roles also by src. A missing
version key is added.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
name |
The collection or role name, such as community.general. |
version |
The new version or range, such as 9.4.0 or >=9.0.0. |
Returns: The list of paths that changed.
Example
Used in: ansible-collections