community.general.bitbucket_pipeline_key_pair – Manages Bitbucket pipeline SSH key pair
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_key_pair
.
Parameters
Parameter |
Comments |
---|---|
OAuth consumer key. If not set the environment variable |
|
OAuth consumer secret. If not set the environment variable |
|
The private key. |
|
The public key. |
|
The repository name. |
|
Indicates desired state of the key pair. Choices:
|
|
The repository owner. |
Notes
Note
Bitbucket OAuth consumer key and secret can be obtained from Bitbucket profile -> Settings -> Access Management -> OAuth.
Check mode is supported.
Examples
- name: Create or update SSH key pair
community.general.bitbucket_pipeline_key_pair:
repository: 'bitbucket-repo'
username: bitbucket_username
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
username: bitbucket_username
state: absent
Authors
Evgeniy Krysanov (@catcombo)