community.general.bitbucket_pipeline_known_host (8.5.0) — module

Manages Bitbucket pipeline known hosts

Authors: Evgeniy Krysanov (@catcombo)

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

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 O(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
  community.general.bitbucket_pipeline_known_host:
    repository: 'bitbucket-repo'
    workspace: bitbucket_workspace
    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
  community.general.bitbucket_pipeline_known_host:
    repository: bitbucket-repo
    workspace: bitbucket_workspace
    name: bitbucket.org
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Specify public key file
  community.general.bitbucket_pipeline_known_host:
    repository: bitbucket-repo
    workspace: bitbucket_workspace
    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

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

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

password:
    description:
    - The App password.
    - If not set the environment variable E(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 E(BITBUCKET_CLIENT_ID) will be used.
    type: str

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

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

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