redhat.satellite.webhook module – Manage Webhooks
Note
This module is part of the redhat.satellite collection (version 4.2.0).
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 redhat.satellite
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: redhat.satellite.webhook
.
New in redhat.satellite 4.0.0
Synopsis
Manage Webhooks
Requirements
The below requirements are needed on the host that executes this module.
requests
Parameters
Parameter |
Comments |
---|---|
Enable or disable the webhook Choices:
|
|
Name of the event that shall trigger the webhook Required when creating a new webhook |
|
The HTTP content type for the webhook |
|
HTTP headers for the webhook |
|
The HTTP method used in the webhook Choices:
|
|
List of locations the entity should be assigned to |
|
Name of the Webhook |
|
List of organizations the entity should be assigned to |
|
Password of the user accessing the Foreman server. If the value is not specified in the task, the value of environment variable |
|
Authorize with client certificate and validate CA from Settings Choices:
|
|
URL of the Foreman server. If the value is not specified in the task, the value of environment variable |
|
X509 Certification Authorities concatenated in PEM format |
|
State of the entity Choices:
|
|
The URL to call when the webhook is triggered Required when creating a new webhook |
|
Username accessing the Foreman server. If the value is not specified in the task, the value of environment variable |
|
Whether or not to verify the TLS certificates of the Foreman server. If the value is not specified in the task, the value of environment variable Choices:
|
|
Verify SSL certs for the webhook Choices:
|
|
Password for the webhook, if required |
|
Name of the webhook template |
|
Username for the webhook, if required |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying the entity |
|
Support: full |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
Examples
- name: 'Create Webhook'
redhat.satellite.webhook:
username: 'admin'
password: 'secret_password'
server_url: 'https://satellite.example.com'
name: 'test-webhook'
target_url: 'https://google.com'
http_method: 'GET'
event: 'actions.katello.content_view.promote_succeeded'
enabled: true
organizations:
- 'MyOrg'
locations:
- 'DC1'
- name: 'Remove Webhook'
redhat.satellite.webhook:
username: 'admin'
password: 'secret_password'
server_url: 'https://satellite.example.com'
name: 'test-webhook'
state: 'absent'
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Final state of the affected entities grouped by their type. Returned: success |
|
List of webhooks. Returned: success |