esp / esp.bitbucket / 1.4.1 / module / bitbucket_webhook Manage repository webhooks on Bitbucket Server | "added in version" 1.0.0 of esp.bitbucket" Authors: Pawel Smolarzesp.bitbucket.bitbucket_webhook (1.4.1) — module
Install with ansible-galaxy collection install esp.bitbucket:==1.4.1
collections: - name: esp.bitbucket version: 1.4.1
Manages repository webhooks on Bitbucket Server.
Authentication can be done with I(token) or with I(username) and I(password).
- name: Create webhook esp.bitbucket.bitbucket_webhook: url: 'https://bitbucket.example.com' username: jsmith password: secrect repository: bar project_key: FOO validate_certs: no state: present webhook_name: wh_repo1 webhook_url: "https://jenkins.example.com/bitbucket-hook/" event: "repo:refs_changed"
url: description: - Bitbucket Server URL. required: false type: str event: default: repo:refs_changed description: - Webhook events list seperated by comma required: true type: str sleep: default: 5 description: - Number of seconds to sleep between API retries. type: int state: choices: - absent - present default: present description: - Whether the webhook should exist or not. required: false type: str token: description: - Token parameter for authentication. - This is only needed when not using I(username) and I(password). required: false type: str retries: default: 3 description: - Number of retries to call Bitbucket API URL before failure. type: int password: description: - Password used for authentication. - This is only needed when not using I(token). - Required when I(username) is provided. required: false type: str username: aliases: - user description: - Username used for authentication. - This is only needed when not using I(token). - Required when I(password) is provided. required: false type: str use_proxy: default: true description: - If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts. type: bool repository: description: - Repository name. required: true type: str project_key: aliases: - project description: - Bitbucket project key. required: true type: str webhook_url: aliases: - wh_url default: https://jenkins.example.com/bitbucket-hook/ description: - Webhook url required: true type: str webhook_name: aliases: - wh_name default: wh_<repo> description: - Webhook name to create required: true type: str return_content: default: true description: - Whether or not to return the body of the response as a "content" key in the dictionary result no matter it succeeded or failed. type: bool validate_certs: default: true description: - If C(no), SSL certificates will not be validated. - This should only set to C(no) used on personally controlled sites using self-signed certificates. type: bool