community.general.bitbucket_access_key module – Manages Bitbucket repository access keys
Note
This module is part of the community.general collection (version 4.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 App password. If not set the environment variable |
|
The repository name. |
|
Indicates desired state of the access key. Choices:
|
|
The username. If not set the environment variable |
|
The repository owner. Alias username has been deprecated and will become an alias of user in community.general 6.0.0. |
Notes
Note
Bitbucket OAuth consumer or App password should have permissions to read and administrate account repositories.
Check mode is supported.
Bitbucket OAuth consumer key and secret can be obtained from Bitbucket profile -> Settings -> Access Management -> OAuth.
Bitbucket App password can be created from Bitbucket profile -> Personal Settings -> App passwords.
If both OAuth and Basic Auth credentials are passed, OAuth credentials take precedence.
Examples
- name: Create access key
community.general.bitbucket_access_key:
repository: 'bitbucket-repo'
workspace: bitbucket_workspace
key: '{{lookup("file", "bitbucket.pub") }}'
label: 'Bitbucket'
state: present
- name: Delete access key
community.general.bitbucket_access_key:
repository: bitbucket-repo
workspace: bitbucket_workspace
label: Bitbucket
state: absent
Authors
Evgeniy Krysanov (@catcombo)
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication