salt.returners.slack_returner

Return salt data via slack

New in version 2015.5.0.

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

slack.channel (required)
slack.api_key (required)
slack.from_name (required)
slack.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:

slack.channel
slack.api_key
slack.from_name

Hipchat settings may also be configured as:

slack:
    channel: RoomName
    api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    from_name: [email protected]

alternative.slack:
    room_id: RoomName
    api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    from_name: [email protected]

slack_profile:
    api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    from_name: [email protected]

slack:
    profile: slack_profile
    channel: RoomName

alternative.slack:
    profile: slack_profile
    channel: RoomName

To use the HipChat returner, append '--return slack' to the salt command.

salt '*' test.ping --return slack

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

salt '*' test.ping --return slack --return_config alternative
salt.returners.slack_returner.returner(ret)

Send an slack message with the data