community.general.jabber module – Send a message to jabber user or chat room
Note
This module is part of the community.general collection (version 9.5.0).
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
. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: community.general.jabber
.
Synopsis
- Send a message to jabber
Requirements
The below requirements are needed on the host that executes this module.
- python xmpp (xmpppy)
Parameters
Parameter | Comments |
---|---|
encoding string | message encoding |
host string | host to connect, overrides user info |
msg string / required | The message body. |
password string / required | password for user to connect |
port integer | port to connect to, overrides default Default: |
to string / required | user ID or name of the room, when using room use a slash to indicate your nick. |
user string / required | User as which to connect |
Attributes
Attribute | Support | Description |
---|---|---|
check_mode | Support: full | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
Examples
- name: Send a message to a user community.general.jabber: user: mybot@example.net password: secret to: friend@example.net msg: Ansible task finished - name: Send a message to a room community.general.jabber: user: mybot@example.net password: secret to: mychaps@conference.example.net/ansiblebot msg: Ansible task finished - name: Send a message, specifying the host and port community.general.jabber: user: mybot@example.net host: talk.example.net port: 5223 password: secret to: mychaps@example.net msg: Ansible task finished
Collection links
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/jabber_module.html