Class: Ansible::Ruby::Modules::Mail

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

Overview

This module is useful for sending emails from playbooks. One may wonder why automate sending emails? In complex environments there are from time to time processes that cannot be automated, either because you lack the authority to make it so, or because not everyone agrees to a common approach. If you cannot automate a specific step, but the step is non-blocking, sending out an email to the responsible party to make him perform his part of the bargain is an elegant way to put the responsibility in someone else’s lap. Of course sending out a mail can be equally useful as a way to notify one or more people in a team that a specific action has been (successfully) taken.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

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

#attachString?

Returns A space-separated list of pathnames of files to attach to the message. Attached files will have their content-type set to C(application/octet-stream).

Returns:

  • (String, nil)

    A space-separated list of pathnames of files to attach to the message. Attached files will have their content-type set to C(application/octet-stream).



53
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 53

attribute :attach

#bccObject?

Returns The email-address(es) the mail is being ‘blind’ copied to. This is a comma-separated list, which may contain address and phrase portions.

Returns:

  • (Object, nil)

    The email-address(es) the mail is being ‘blind’ copied to. This is a comma-separated list, which may contain address and phrase portions.



26
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 26

attribute :bcc

#bodyString?

Returns The body of the email being sent.

Returns:

  • (String, nil)

    The body of the email being sent.



33
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 33

attribute :body

#ccString?

Returns The email-address(es) the mail is being copied to. This is a comma-separated list, which may contain address and phrase portions.

Returns:

  • (String, nil)

    The email-address(es) the mail is being copied to. This is a comma-separated list, which may contain address and phrase portions.



22
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 22

attribute :cc

#charsetString?

Returns The character set of email being sent.

Returns:

  • (String, nil)

    The character set of email being sent



61
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 61

attribute :charset

#fromString?

Returns The email-address the mail is sent from. May contain address and phrase.

Returns:

  • (String, nil)

    The email-address the mail is sent from. May contain address and phrase.



14
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 14

attribute :from

#headersString?

Returns A vertical-bar-separated list of headers which should be added to the message. Each individual header is specified as C(header=value) (see example below).

Returns:

  • (String, nil)

    A vertical-bar-separated list of headers which should be added to the message. Each individual header is specified as C(header=value) (see example below).



57
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 57

attribute :headers

#hostString?

Returns The mail server.

Returns:

  • (String, nil)

    The mail server



45
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 45

attribute :host

#passwordString?

Returns If SMTP requires password.

Returns:

  • (String, nil)

    If SMTP requires password



41
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 41

attribute :password

#portString?

Returns The mail server port.

Returns:

  • (String, nil)

    The mail server port



49
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 49

attribute :port

#subjectString

Returns The subject of the email being sent.

Returns:

  • (String)

    The subject of the email being sent.



29
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 29

attribute :subject

#subtypeString?

Returns The minor mime type, can be either text or html. The major type is always text.

Returns:

  • (String, nil)

    The minor mime type, can be either text or html. The major type is always text.



65
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 65

attribute :subtype

#toString?

Returns The email-address(es) the mail is being sent to. This is a comma-separated list, which may contain address and phrase portions.

Returns:

  • (String, nil)

    The email-address(es) the mail is being sent to. This is a comma-separated list, which may contain address and phrase portions.



18
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 18

attribute :to

#usernameString?

Returns If SMTP requires username.

Returns:

  • (String, nil)

    If SMTP requires username



37
# File 'lib/ansible/ruby/modules/generated/extras/notification/mail.rb', line 37

attribute :username