Class: Ansible::Ruby::Modules::Mail
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Mail
- Defined in:
- lib/ansible/ruby/modules/generated/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 them perform their 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
-
#attach ⇒ Object?
A list of pathnames of files to attach to the message.,Attached files will have their content-type set to C(application/octet-stream).
-
#bcc ⇒ Object?
The email-address(es) the mail is being ‘blind’ copied to.,This is a list, which may contain address and phrase portions.
-
#body ⇒ String?
The body of the email being sent.
-
#cc ⇒ String?
The email-address(es) the mail is being copied to.,This is a list, which may contain address and phrase portions.
-
#charset ⇒ String?
The character set of email being sent.
-
#from ⇒ String?
The email-address the mail is sent from.
-
#headers ⇒ Object?
A list of headers which should be added to the message.,Each individual header is specified as C(header=value) (see example below).
-
#host ⇒ String?
The mail server.
-
#password ⇒ String?
If SMTP requires password.
-
#port ⇒ Integer?
The mail server port.,This must be a valid integer between 1 and 65534.
-
#secure ⇒ :always, ...
If C(always), the connection will only send email if the connection is Encrypted.
-
#subject ⇒ String
The subject of the email being sent.
-
#subtype ⇒ :html, ...
The minor mime type, can be either C(plain) or C(html).,The major type is always C(text).
-
#timeout ⇒ Integer?
Sets the timeout in seconds for connection attempts.
-
#to ⇒ String?
The email-address(es) the mail is being sent to.,This is a list, which may contain address and phrase portions.
-
#username ⇒ String?
If SMTP requires username.
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
#attach ⇒ Object?
Returns A list of pathnames of files to attach to the message.,Attached files will have their content-type set to C(application/octet-stream).
54 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 54 attribute :attach |
#bcc ⇒ Object?
Returns The email-address(es) the mail is being ‘blind’ copied to.,This is a list, which may contain address and phrase portions.
27 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 27 attribute :bcc |
#body ⇒ String?
Returns The body of the email being sent.
34 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 34 attribute :body |
#cc ⇒ String?
Returns The email-address(es) the mail is being copied to.,This is a list, which may contain address and phrase portions.
23 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 23 attribute :cc |
#charset ⇒ String?
Returns The character set of email being sent.
60 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 60 attribute :charset |
#from ⇒ String?
Returns The email-address the mail is sent from. May contain address and phrase.
15 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 15 attribute :from |
#headers ⇒ Object?
Returns A 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/notification/mail.rb', line 57 attribute :headers |
#host ⇒ String?
Returns The mail server.
46 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 46 attribute :host |
#password ⇒ String?
Returns If SMTP requires password.
42 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 42 attribute :password |
#port ⇒ Integer?
Returns The mail server port.,This must be a valid integer between 1 and 65534.
50 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 50 attribute :port |
#secure ⇒ :always, ...
Returns If C(always), the connection will only send email if the connection is Encrypted. If the server doesn’t accept the encrypted connection it will fail.,If C(try), the connection will attempt to setup a secure SSL/TLS session, before trying to send.,If C(never), the connection will not attempt to setup a secure SSL/TLS session, before sending,If C(starttls), the connection will try to upgrade to a secure SSL/TLS connection, before sending. If it is unable to do so it will fail.
68 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 68 attribute :secure |
#subject ⇒ String
Returns The subject of the email being sent.
30 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 30 attribute :subject |
#subtype ⇒ :html, ...
Returns The minor mime type, can be either C(plain) or C(html).,The major type is always C(text).
64 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 64 attribute :subtype |
#timeout ⇒ Integer?
Returns Sets the timeout in seconds for connection attempts.
72 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 72 attribute :timeout |
#to ⇒ String?
Returns The email-address(es) the mail is being sent to.,This is a list, which may contain address and phrase portions.
19 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 19 attribute :to |
#username ⇒ String?
Returns If SMTP requires username.
38 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 38 attribute :username |