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

Manages Bitbucket pipeline known hosts

| "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 pipeline known hosts under the "SSH Keys" menu.

The host fingerprint will be retrieved automatically, but in case of an error, one can use I(key) field to specify it manually.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create known hosts from the list
  bitbucket_pipeline_known_host:
    repository: 'bitbucket-repo'
    username: bitbucket_username
    name: '{{ item }}'
    state: present
  with_items:
    - bitbucket.org
    - example.com
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove known host
  bitbucket_pipeline_known_host:
    repository: bitbucket-repo
    username: bitbucket_username
    name: bitbucket.org
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Specify public key file
  bitbucket_pipeline_known_host:
    repository: bitbucket-repo
    username: bitbucket_username
    name: bitbucket.org
    key: '{{lookup("file", "bitbucket.pub") }}'
    state: absent

Inputs

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

name:
    description:
    - The FQDN of the known host.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    description:
    - Indicates desired state of the record.
    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