community.general.bitbucket_access_key – Manages Bitbucket repository access keys
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_access_key
.
Parameters
Parameter |
Comments |
---|---|
The OAuth consumer key. If not set the environment variable |
|
The OAuth consumer secret. If not set the environment variable |
|
The SSH public key. |
|
The key label. |
|
The repository name. |
|
Indicates desired state of the access key. Choices:
|
|
The repository owner. |
Notes
Note
Bitbucket OAuth consumer key and secret can be obtained from Bitbucket profile -> Settings -> Access Management -> OAuth.
Bitbucket OAuth consumer should have permissions to read and administrate account repositories.
Check mode is supported.
Examples
- name: Create access key
community.general.bitbucket_access_key:
repository: 'bitbucket-repo'
username: bitbucket_username
key: '{{lookup("file", "bitbucket.pub") }}'
label: 'Bitbucket'
state: present
- name: Delete access key
community.general.bitbucket_access_key:
repository: bitbucket-repo
username: bitbucket_username
label: Bitbucket
state: absent
Authors
Evgeniy Krysanov (@catcombo)