salt.returners.xmpp_return

Return salt data via xmpp

The following fields can be set in the minion conf file:

xmpp.jid (required)
xmpp.password (required)
xmpp.recipient (required)
xmpp.profile (optional)

Alternative configuration values can be used by prefacing the configuration. Any values not found in the alternative configuration will be pulled from the default location:

xmpp.jid
xmpp.password
xmpp.recipient
xmpp.profile

XMPP settings may also be configured as:

xmpp:
    jid: user@xmpp.domain.com/resource
    password: password
    recipient: user@xmpp.example.com

alternative.xmpp:
    jid: user@xmpp.domain.com/resource
    password: password
    recipient: someone@xmpp.example.com

xmpp_profile:
    xmpp.jid: user@xmpp.domain.com/resource
    xmpp.password: password

xmpp:
    profile: xmpp_profile
    recipient: user@xmpp.example.com

alternative.xmpp:
    profile: xmpp_profile
    recipient: someone-else@xmpp.example.com

To use the XMPP returner, append '--return xmpp' to the salt command.

salt '*' test.ping --return xmpp

To use the alternative configuration, append '--return_config alternative' to the salt command.

2015.5.0 新版功能.

salt '*' test.ping --return xmpp --return_config alternative

To override individual configuration items, append --return_kwargs '{"key:": "value"}' to the salt command.

2016.3.0 新版功能.

salt '*' test.ping --return xmpp --return_kwargs '{"recipient": "someone-else@xmpp.example.com"}'
class salt.returners.xmpp_return.SendMsgBot(jid, password, recipient, msg)
start(event)
salt.returners.xmpp_return.returner(ret)

Send an xmpp message with the data