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?
54 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 54 attribute :attach |
#bcc ⇒ Object?
27 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 27 attribute :bcc |
#body ⇒ String?
34 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 34 attribute :body |
#cc ⇒ String?
23 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 23 attribute :cc |
#charset ⇒ String?
60 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 60 attribute :charset |
#from ⇒ String?
15 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 15 attribute :from |
#headers ⇒ Object?
57 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 57 attribute :headers |
#host ⇒ String?
46 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 46 attribute :host |
#password ⇒ String?
42 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 42 attribute :password |
#port ⇒ Integer?
50 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 50 attribute :port |
#secure ⇒ :always, ...
68 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 68 attribute :secure |
#subject ⇒ String
30 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 30 attribute :subject |
#subtype ⇒ :html, ...
64 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 64 attribute :subtype |
#timeout ⇒ Integer?
72 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 72 attribute :timeout |
#to ⇒ String?
19 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 19 attribute :to |
#username ⇒ String?
38 |
# File 'lib/ansible/ruby/modules/generated/notification/mail.rb', line 38 attribute :username |