ansible.builtin.bitbucket_access_key (v2.9.27) — module

Manages Bitbucket repository access keys

| "added in version" 2.8 of ansible.builtin"

Authors: Evgeniy Krysanov (@catcombo)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Manages Bitbucket repository access keys (also called deploy keys).

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create access key
  bitbucket_access_key:
    repository: 'bitbucket-repo'
    username: bitbucket_username
    key: '{{lookup("file", "bitbucket.pub") }}'
    label: 'Bitbucket'
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete access key
  bitbucket_access_key:
    repository: bitbucket-repo
    username: bitbucket_username
    label: Bitbucket
    state: absent

Inputs

    
key:
    description:
    - The SSH public key.
    type: str

label:
    description:
    - The key label.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    description:
    - Indicates desired state of the access key.
    required: true
    type: str

username:
    description:
    - The repository owner.
    required: true
    type: str

client_id:
    description:
    - The OAuth consumer key.
    - If not set the environment variable C(BITBUCKET_CLIENT_ID) will be used.
    type: str

repository:
    description:
    - The repository name.
    required: true
    type: str

client_secret:
    description:
    - The OAuth consumer secret.
    - If not set the environment variable C(BITBUCKET_CLIENT_SECRET) will be used.
    type: str