W3cubDocs

/Ansible 2.9

bitbucket_pipeline_key_pair – Manages Bitbucket pipeline SSH key pair

New in version 2.8.

Synopsis

  • Manages Bitbucket pipeline SSH key pair.

Parameters

Parameter Choices/Defaults Comments
client_id
string
OAuth consumer key.
If not set the environment variable BITBUCKET_CLIENT_ID will be used.
client_secret
string
OAuth consumer secret.
If not set the environment variable BITBUCKET_CLIENT_SECRET will be used.
private_key
string
The private key.
public_key
string
The public key.
repository
string / required
The repository name.
state
string / required
    Choices:
  • absent
  • present
Indicates desired state of the key pair.
username
string / required
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
  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
  bitbucket_pipeline_key_pair:
    repository: bitbucket-repo
    username: bitbucket_username
    state: absent

Status

Authors

  • Evgeniy Krysanov (@catcombo)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/bitbucket_pipeline_key_pair_module.html