8025-awxRefactor #26
|
@ -7,6 +7,7 @@ resolv:
|
||||||
resolvers:
|
resolvers:
|
||||||
- '10.0.0.4'
|
- '10.0.0.4'
|
||||||
- '10.0.0.5'
|
- '10.0.0.5'
|
||||||
|
awx_email: awx@verdnatura.es
|
||||||
awx_pub_key: >
|
awx_pub_key: >
|
||||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDjeIZVyppFK/dqOUa1PxgSeRVWk7MFmANYvSs+VHHn
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDjeIZVyppFK/dqOUa1PxgSeRVWk7MFmANYvSs+VHHn
|
||||||
D4/BE//K8AxlxnyLl4e6jAcBFoIu1JLxbRKdOhx+Zgkq5OmEzp/XKzfEvnEU5CP+W2+5MwfkUQ3TetJs
|
D4/BE//K8AxlxnyLl4e6jAcBFoIu1JLxbRKdOhx+Zgkq5OmEzp/XKzfEvnEU5CP+W2+5MwfkUQ3TetJs
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
become: no
|
become: no
|
||||||
become_method: sudo
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Send mail
|
- name: Send mail
|
||||||
import_role:
|
import_role:
|
||||||
name: config-send-mail
|
name: send-mail
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
- name: Send mail using Verdnatura SMTP servers
|
- name: Send mail using own SMTP server
|
||||||
community.general.mail:
|
community.general.mail:
|
||||||
host: smtp.verdnatura.es
|
host: "{{ smtp_server }}"
|
||||||
port: 465
|
port: 465
|
||||||
username: awx@verdnatura.es
|
username: "{{ awx_email }}"
|
||||||
password: "{{ awx_smtp_password }}"
|
password: "{{ awx_smtp_password }}"
|
||||||
to: "{{ sysadmin_mail }}"
|
to: "{{ sysadmin_mail }}"
|
||||||
subject: Ansible-test
|
subject: Ansible test
|
||||||
body: System {{ ansible_hostname }} has been send successfully mail.
|
body: System {{ ansible_fqdn }} has sent the email successfully.
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
Loading…
Reference in New Issue