community.general.bitbucket_pipeline_key_pair module – Manages Bitbucket pipeline SSH key pair
Note
This module is part of the community.general collection (version 6.6.2).
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_key_pair
.
Synopsis
Manages Bitbucket pipeline SSH key pair.
Parameters
Parameter |
Comments |
---|---|
The OAuth consumer key. If not set the environment variable |
|
The OAuth consumer secret. If not set the environment variable |
|
The App password. If not set the environment variable |
|
The private key. |
|
The public key. |
|
The repository name. |
|
Indicates desired state of the key pair. Choices:
|
|
The username. If not set the environment variable username is an alias of user since community.genreal 6.0.0. It was an alias of workspace before. |
|
The repository owner. username used to be an alias of this option. Since community.general 6.0.0 it is an alias of user. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
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 or update SSH key pair
community.general.bitbucket_pipeline_key_pair:
repository: 'bitbucket-repo'
workspace: bitbucket_workspace
public_key: '{{lookup("file", "bitbucket.pub") }}'
private_key: '{{lookup("file", "bitbucket") }}'
state: present
- name: Remove SSH key pair
community.general.bitbucket_pipeline_key_pair:
repository: bitbucket-repo
workspace: bitbucket_workspace
state: absent
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication