W3cubDocs

/Ansible 2.9

bitbucket_pipeline_known_host – Manages Bitbucket pipeline known hosts

New in version 2.8.

Synopsis

  • 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 key field to specify it manually.

Requirements

The below requirements are needed on the host that executes this module.

  • paramiko

Parameters

Parameter Choices/Defaults Comments
client_id
string
The OAuth consumer key.
If not set the environment variable BITBUCKET_CLIENT_ID will be used.
client_secret
string
The OAuth consumer secret.
If not set the environment variable BITBUCKET_CLIENT_SECRET will be used.
key
string
The public key.
name
string / required
The FQDN of the known host.
repository
string / required
The repository name.
state
string / required
    Choices:
  • absent
  • present
Indicates desired state of the record.
username
string / required
The repository owner.

Notes

Note

  • Bitbucket OAuth consumer key and secret can be obtained from Bitbucket profile -> Settings -> Access Management -> OAuth.
  • Check mode is supported.

Examples

- 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

- name: Remove known host
  bitbucket_pipeline_known_host:
    repository: bitbucket-repo
    username: bitbucket_username
    name: bitbucket.org
    state: absent

- 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

Status

Authors

  • Evgeniy Krysanov (@catcombo)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/bitbucket_pipeline_known_host_module.html