community.general.bitbucket_pipeline_variable (1.3.14) — module

Manages Bitbucket pipeline variables

Authors: Evgeniy Krysanov (@catcombo)

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 1.3.14

Description

Manages Bitbucket pipeline variables.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create or update pipeline variables from the list
  community.general.bitbucket_pipeline_variable:
    repository: 'bitbucket-repo'
    username: bitbucket_username
    name: '{{ item.name }}'
    value: '{{ item.value }}'
    secured: '{{ item.secured }}'
    state: present
  with_items:
    - { name: AWS_ACCESS_KEY, value: ABCD1234, secured: False }
    - { name: AWS_SECRET, value: qwe789poi123vbn0, secured: True }
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove pipeline variable
  community.general.bitbucket_pipeline_variable:
    repository: bitbucket-repo
    username: bitbucket_username
    name: AWS_ACCESS_KEY
    state: absent

Inputs

    
name:
    description:
    - The pipeline variable name.
    required: true
    type: str

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

value:
    description:
    - The pipeline variable value.
    type: str

secured:
    default: false
    description:
    - Whether to encrypt the variable value.
    type: bool

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