Class: Ansible::Ruby::Modules::Slack

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/notification/slack.rb

Overview

The C(slack) module sends notifications to U(slack.com) via the Incoming WebHook integration

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#attachmentsArray<Hash>, ...

Returns Define a list of attachments. This list mirrors the Slack JSON API.,For more information, see also in the (U(api.slack.com/docs/attachments)).

Returns:

  • (Array<Hash>, Hash, nil)

    Define a list of attachments. This list mirrors the Slack JSON API.,For more information, see also in the (U(api.slack.com/docs/attachments)).



54
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 54

attribute :attachments

#channelString?

Returns Channel to send the message to. If absent, the message goes to the channel selected for the I(token).

Returns:

  • (String, nil)

    Channel to send the message to. If absent, the message goes to the channel selected for the I(token).



23
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 23

attribute :channel

#color:normal, ...

Returns Allow text to use default colors - use the default of ‘normal’ to not send a custom color bar at the start of the message.

Returns:

  • (:normal, :good, :warning, :danger, nil)

    Allow text to use default colors - use the default of ‘normal’ to not send a custom color bar at the start of the message



50
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 50

attribute :color

#domainObject?

Returns Slack (sub)domain for your environment without protocol. (i.e. C(example.slack.com)) In 1.8 and beyond, this is deprecated and may be ignored. See token documentation for information.

Returns:

  • (Object, nil)

    Slack (sub)domain for your environment without protocol. (i.e. C(example.slack.com)) In 1.8 and beyond, this is deprecated and may be ignored. See token documentation for information.



12
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 12

attribute :domain

#icon_emojiObject?

Returns Emoji for the message sender. See Slack documentation for options. (if I(icon_emoji) is set, I(icon_url) will not be used).

Returns:

  • (Object, nil)

    Emoji for the message sender. See Slack documentation for options. (if I(icon_emoji) is set, I(icon_url) will not be used)



35
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 35

attribute :icon_emoji

#icon_urlString?

Returns Url for the message sender’s icon (default C(www.ansible.com/favicon.ico)).

Returns:



31
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 31

attribute :icon_url

Returns Automatically create links for channels and usernames in I(msg).

Returns:

  • (1, 0, nil)

    Automatically create links for channels and usernames in I(msg).



38
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 38

attribute :link_names

#msgString?

Returns Message to send. Note that the module does not handle escaping characters. Plain-text angle brackets and ampersands should be converted to HTML entities (e.g. & to &amp;) before sending. See Slack’s documentation (U(api.slack.com/docs/message-formatting)) for more.

Returns:

  • (String, nil)

    Message to send. Note that the module does not handle escaping characters. Plain-text angle brackets and ampersands should be converted to HTML entities (e.g. & to &amp;) before sending. See Slack’s documentation (U(api.slack.com/docs/message-formatting)) for more.



19
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 19

attribute :msg

#parse:full, ...

Returns Setting for the message parser at Slack.

Returns:

  • (:full, :none, nil)

    Setting for the message parser at Slack



42
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 42

attribute :parse

#tokenString

Returns Slack integration token. This authenticates you to the slack service. Prior to 1.8, a token looked like C(3Ffe373sfhRE6y42Fg3rvf4GlK). In 1.8 and above, ansible adapts to the new slack API where tokens look like C(G922VJP24/D921DW937/3Ffe373sfhRE6y42Fg3rvf4GlK). If tokens are in the new format then slack will ignore any value of domain. If the token is in the old format the domain is required. Ansible has no control of when slack will get rid of the old API. When slack does that the old format will stop working. ** Please keep in mind the tokens are not the API tokens but are the webhook tokens. In slack these are found in the webhook URL which are obtained under the apps and integrations. The incoming webhooks can be added in that area. In some cases this may be locked by your Slack admin and you must request access. It is there that the incoming webhooks can be added. The key is on the end of the URL given to you in that section.

Returns:

  • (String)

    Slack integration token. This authenticates you to the slack service. Prior to 1.8, a token looked like C(3Ffe373sfhRE6y42Fg3rvf4GlK). In 1.8 and above, ansible adapts to the new slack API where tokens look like C(G922VJP24/D921DW937/3Ffe373sfhRE6y42Fg3rvf4GlK). If tokens are in the new format then slack will ignore any value of domain. If the token is in the old format the domain is required. Ansible has no control of when slack will get rid of the old API. When slack does that the old format will stop working. ** Please keep in mind the tokens are not the API tokens but are the webhook tokens. In slack these are found in the webhook URL which are obtained under the apps and integrations. The incoming webhooks can be added in that area. In some cases this may be locked by your Slack admin and you must request access. It is there that the incoming webhooks can be added. The key is on the end of the URL given to you in that section.



15
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 15

attribute :token

#usernameString?

Returns This is the sender of the message.

Returns:

  • (String, nil)

    This is the sender of the message.



27
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 27

attribute :username

#validate_certs:yes, ...

Returns If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.

Returns:

  • (:yes, :no, nil)

    If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.



46
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 46

attribute :validate_certs