22.16.239. salt.modules.xmpp

Module for Sending Messages via XMPP (a.k.a. Jabber)

New in version 2014.1.0.

depends:
  • sleekxmpp python module
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: myuser@jabber.example.org/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: myuser@jabber.example.org/salt
    xmpp.password: verybadpass

my-xmpp-login:
    xmpp.jid: myuser@jabber.example.org
    xmpp.password: verybadpass
class salt.modules.xmpp.SendMsgBot(jid, password, recipient, msg)
start(event)
salt.modules.xmpp.send_msg(recipient, message, jid=None, password=None, profile=None)

Send a message to an XMPP recipient. Designed for use in states.

CLI Examples:

xmpp.send_msg 'admins@xmpp.example.com' 'This is a salt module test'             profile='my-xmpp-account'
xmpp.send_msg 'admins@xmpp.example.com' 'This is a salt module test'             jid='myuser@xmpp.example.com/salt' password='verybadpass'

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Previous topic

22.16.238. salt.modules.xapi

Next topic

22.16.240. salt.modules.yumpkg

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.