community.general.bitbucket_pipeline_variable – Manages Bitbucket pipeline variables
Note
This plugin is part of the community.general collection (version 3.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.bitbucket_pipeline_variable
.
Parameters
Parameter |
Comments |
---|---|
The OAuth consumer key. If not set the environment variable |
|
The OAuth consumer secret. If not set the environment variable |
|
The pipeline variable name. |
|
The repository name. |
|
Whether to encrypt the variable value. Choices:
|
|
Indicates desired state of the variable. Choices:
|
|
The repository owner. |
|
The pipeline variable value. |
Notes
Note
Bitbucket OAuth consumer key and secret can be obtained from Bitbucket profile -> Settings -> Access Management -> OAuth.
Check mode is supported.
For secured values return parameter
changed
is alwaysTrue
.
Examples
- name: Create or update pipeline variables from the list
community.general.bitbucket_pipeline_variable:
repository: 'bitbucket-repo'
username: bitbucket_username
name: '{{ item.name }}'
value: '{{ item.value }}'
secured: '{{ item.secured }}'
state: present
with_items:
- { name: AWS_ACCESS_KEY, value: ABCD1234, secured: False }
- { name: AWS_SECRET, value: qwe789poi123vbn0, secured: True }
- name: Remove pipeline variable
community.general.bitbucket_pipeline_variable:
repository: bitbucket-repo
username: bitbucket_username
name: AWS_ACCESS_KEY
state: absent
Authors
Evgeniy Krysanov (@catcombo)