community.general.bitbucket_pipeline_known_host – Manages Bitbucket pipeline known hosts
Note
This plugin is part of the community.general collection (version 3.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.bitbucket_pipeline_known_host
.
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.
Parameters
Parameter |
Comments |
---|---|
The OAuth consumer key. If not set the environment variable |
|
The OAuth consumer secret. If not set the environment variable |
|
The public key. |
|
The FQDN of the known host. |
|
The repository name. |
|
Indicates desired state of the record. Choices:
|
|
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
community.general.bitbucket_pipeline_known_host:
repository: 'bitbucket-repo'
username: bitbucket_username
name: '{{ item }}'
state: present
with_items:
- bitbucket.org
- example.com
- name: Remove known host
community.general.bitbucket_pipeline_known_host:
repository: bitbucket-repo
username: bitbucket_username
name: bitbucket.org
state: absent
- name: Specify public key file
community.general.bitbucket_pipeline_known_host:
repository: bitbucket-repo
username: bitbucket_username
name: bitbucket.org
key: '{{lookup("file", "bitbucket.pub") }}'
state: absent
Authors
Evgeniy Krysanov (@catcombo)