community.general.bitbucket_pipeline_key_pair (6.6.8) — module

Manages Bitbucket pipeline SSH key pair

Authors: Evgeniy Krysanov (@catcombo)

Install collection

Install with ansible-galaxy collection install community.general:==6.6.8


Add to requirements.yml

  collections:
    - name: community.general
      version: 6.6.8

Description

Manages Bitbucket pipeline SSH key pair.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove SSH key pair
  community.general.bitbucket_pipeline_key_pair:
    repository: bitbucket-repo
    workspace: bitbucket_workspace
    state: absent

Inputs

    
user:
    aliases:
    - username
    description:
    - The username.
    - If not set the environment variable C(BITBUCKET_USERNAME) will be used.
    - I(username) is an alias of I(user) since community.genreal 6.0.0. It was an alias
      of I(workspace) before.
    type: str
    version_added: 4.0.0
    version_added_collection: community.general

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

password:
    description:
    - The App password.
    - If not set the environment variable C(BITBUCKET_PASSWORD) will be used.
    type: str
    version_added: 4.0.0
    version_added_collection: community.general

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

workspace:
    description:
    - The repository owner.
    - I(username) used to be an alias of this option. Since community.general 6.0.0 it
      is an alias of I(user).
    required: true
    type: str

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

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

private_key:
    description:
    - The private key.
    type: str

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