New in version 2.3.
parameter | required | default | choices | comments |
---|---|---|---|---|
api_key |
yes | Mattermost webhook api key. Log into your mattermost site, go to Menu -> Integration -> Incomming Webhook -> Add Incomming Webhook. This will give you full URL. api_key is the last part. http://mattermost.example.com/hooks/ API_KEY | ||
channel |
no | Channel to send the message to. If absent, the message goes to the channel selected for the api_key. | ||
icon_url |
no | https://www.ansible.com/favicon.ico | Url for the message sender's icon. | |
text |
yes | Text to send. Note that the module does not handle escaping characters. | ||
url |
yes | Mattermost url (i.e. http://mattermost.yourcompany.com). | ||
username |
no | Ansible | This is the sender of the message (Username Override need to be enabled by mattermost admin, see mattermost doc. | |
validate_certs |
no | True |
|
If no , SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
- name: Send notification message via Mattermost mattermost: url: http://mattermost.example.com api_key: my_api_key text: '{{ inventory_hostname }} completed' - name: Send notification message via Mattermost all options mattermost: url: http://mattermost.example.com api_key: my_api_key text: '{{ inventory_hostname }} completed' channel: notifications username: 'Ansible on {{ inventory_hostname }}' icon_url: http://www.example.com/some-image-file.png
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
webhook_url | URL the webhook is sent to | success | string | |
payload | Mattermost payload | success | string |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is community maintained without core committer oversight.
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.