bitbucket_access_key – Manages Bitbucket repository access keys
New in version 2.8.
Synopsis
- Manages Bitbucket repository access keys (also called deploy keys).
 
Parameters
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
|   client_id    string    |    The OAuth consumer key.  If not set the environment variable   BITBUCKET_CLIENT_ID will be used. |  |
|   client_secret    string    |    The OAuth consumer secret.  If not set the environment variable   BITBUCKET_CLIENT_SECRET will be used. |  |
|   key    string    |    The SSH public key.   |  |
|   label    string / required    |    The key label.   |  |
|   repository    string / required    |    The repository name.   |  |
|   state    string / required    |   
  |    Indicates desired state of the access key.   |  
|   username    string / required    |    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
  bitbucket_access_key:
    repository: 'bitbucket-repo'
    username: bitbucket_username
    key: '{{lookup("file", "bitbucket.pub") }}'
    label: 'Bitbucket'
    state: present
- name: Delete access key
  bitbucket_access_key:
    repository: bitbucket-repo
    username: bitbucket_username
    label: Bitbucket
    state: absent
   Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
 - This module is maintained by the Ansible Community. [community]
 
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_access_key_module.html