Class: Ansible::Ruby::Modules::Slack
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Slack
- 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
-
#attachments ⇒ Array<Hash>, ...
Define a list of attachments.
-
#channel ⇒ String?
Channel to send the message to.
-
#color ⇒ :normal, ...
Allow text to use default colors - use the default of ‘normal’ to not send a custom color bar at the start of the message.
-
#domain ⇒ Object?
Slack (sub)domain for your environment without protocol.
-
#icon_emoji ⇒ Object?
Emoji for the message sender.
-
#icon_url ⇒ String?
Url for the message sender’s icon (default C(www.ansible.com/favicon.ico)).
-
#link_names ⇒ 1, ...
Automatically create links for channels and usernames in I(msg).
-
#msg ⇒ String?
Message to send.
-
#parse ⇒ :full, ...
Setting for the message parser at Slack.
-
#token ⇒ String
Slack integration token.
-
#username ⇒ String?
This is the sender of the message.
-
#validate_certs ⇒ :yes, ...
If C(no), SSL certificates will not be validated.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#attachments ⇒ Array<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)).
54 |
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 54 attribute :attachments |
#channel ⇒ String?
Returns 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.
50 |
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 50 attribute :color |
#domain ⇒ Object?
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.
12 |
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 12 attribute :domain |
#icon_emoji ⇒ Object?
Returns 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_url ⇒ String?
Returns Url for the message sender’s icon (default C(www.ansible.com/favicon.ico)).
31 |
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 31 attribute :icon_url |
#link_names ⇒ 1, ...
Returns 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 |
#msg ⇒ String?
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 &) 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.
42 |
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 42 attribute :parse |
#token ⇒ String
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.
15 |
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 15 attribute :token |
#username ⇒ String?
Returns 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.
46 |
# File 'lib/ansible/ruby/modules/generated/notification/slack.rb', line 46 attribute :validate_certs |