salt.modules.xmpp
Module for Sending Messages via XMPP (a.k.a. Jabber)
New in version 2014.1.0.
- depends
-
sleekxmpp>=1.3.1
pyasn1
pyasn1-modules
dnspython
- configuration
-
This module can be used by either passing a jid and password directly to send_message, or by specifying the name of a configuration profile in the minion config, minion pillar, or master config.
For example:
my-xmpp-login: xmpp.jid: [email protected]/resourcename xmpp.password: verybadpass
The resourcename refers to the resource that is using this account. It is user-definable, and optional. The following configurations are both valid:
my-xmpp-login: xmpp.jid: [email protected]/salt xmpp.password: verybadpass my-xmpp-login: xmpp.jid: [email protected] xmpp.password: verybadpass
- class
salt.modules.xmpp.
SendMsgBot
(jid, password, recipient, msg) -
- classmethod
create_multi
(jid, password, msg, recipients=None, rooms=None, nick='SaltStack Bot') -
Alternate constructor that accept multiple recipients and rooms
-
start
(event)
- classmethod
- class
salt.modules.xmpp.
SleekXMPPMUC
(name='') -
-
filter
(record) -
Determine if the specified record is to be logged.
Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.
-
-
Send a message to an XMPP recipient. Designed for use in states.
CLI Examples:
xmpp.send_msg '[email protected]' 'This is a salt module test' profile='my-xmpp-account' xmpp.send_msg '[email protected]' 'This is a salt module test' jid='[email protected]/salt' password='verybadpass'
salt.modules.xmpp.send_msg(recipient, message, jid=None, password=None, profile=None)
-
Send a message to an XMPP recipient, support send message to multiple recipients or chat room.
CLI Examples:
xmpp.send_msg recipients=['[email protected]'] rooms=['[email protected]'] 'This is a salt module test' profile='my-xmpp-account' xmpp.send_msg recipients=['[email protected]'] rooms=['[email protected]'] 'This is a salt module test' jid='[email protected]/salt' password='verybadpass'
salt.modules.xmpp.send_msg_multi(message, recipients=None, rooms=None, jid=None, password=None, nick='SaltStack Bot', profile=None)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.xmpp.html