yamllint + ansible-lint
This commit is contained in:
parent
325804daa5
commit
38e50cf95d
|
@ -8,7 +8,7 @@ env:
|
||||||
- distro: debian9
|
- distro: debian9
|
||||||
- distro: debian8
|
- distro: debian8
|
||||||
- distro: alpine
|
- distro: alpine
|
||||||
#- distro: archlinux
|
# - distro: archlinux
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Configure test script so we can run extra tests after playbook is run
|
# Configure test script so we can run extra tests after playbook is run
|
||||||
|
|
|
@ -9,7 +9,7 @@ msmtp_accounts:
|
||||||
from: emailer-tests@yandex.com
|
from: emailer-tests@yandex.com
|
||||||
user: emailer-tests@yandex.com
|
user: emailer-tests@yandex.com
|
||||||
password: jhlrizltgkmnkkgm
|
password: jhlrizltgkmnkkgm
|
||||||
#Account 2
|
# Account 2
|
||||||
- account: mysmtp
|
- account: mysmtp
|
||||||
host: smtp.example
|
host: smtp.example
|
||||||
port: 587
|
port: 587
|
||||||
|
@ -17,7 +17,7 @@ msmtp_accounts:
|
||||||
from: admin@example.org
|
from: admin@example.org
|
||||||
user: myuser@example.org
|
user: myuser@example.org
|
||||||
password: plain-text-password2
|
password: plain-text-password2
|
||||||
#Account 3
|
# Account 3
|
||||||
- account: gmail
|
- account: gmail
|
||||||
host: smtp.gmail.com
|
host: smtp.gmail.com
|
||||||
port: 587
|
port: 587
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: Adham Helal, Christian Wagner, gitouche
|
author: Adham Helal, Christian Wagner, gitouche
|
||||||
description: "Deploy msmtp mailer on RHEL8"
|
description: "Deploy msmtp mailer on RHEL8"
|
||||||
|
|
|
@ -1,20 +1,16 @@
|
||||||
---
|
---
|
||||||
# Deploy msmtp
|
|
||||||
|
|
||||||
# TODO:
|
|
||||||
# Fix: Check if mailserver is ready, as Test mail will only work,
|
|
||||||
# if msmtp is setup after the mailserver is already configured
|
|
||||||
|
|
||||||
- name: Copy RPM file to server
|
- name: Copy RPM file to server
|
||||||
copy:
|
copy:
|
||||||
src: msmtp-1.8.15-1.el8.x86_64.rpm
|
src: msmtp-1.8.15-1.el8.x86_64.rpm
|
||||||
dest: /tmp/msmtp-1.8.15-1.el8.x86_64.rpm
|
dest: /tmp/msmtp-1.8.15-1.el8.x86_64.rpm
|
||||||
|
mode: 0400
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- name: Copy systemd unit file to server
|
- name: Copy systemd unit file to server
|
||||||
copy:
|
copy:
|
||||||
src: msmtpd.service
|
src: msmtpd.service
|
||||||
dest: /etc/systemd/system/msmtpd.service
|
dest: /etc/systemd/system/msmtpd.service
|
||||||
|
mode: 0400
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- name: enable daemon
|
- name: enable daemon
|
||||||
|
@ -71,6 +67,7 @@
|
||||||
template:
|
template:
|
||||||
src: sysconfig.j2
|
src: sysconfig.j2
|
||||||
dest: /etc/sysconfig/msmtpd
|
dest: /etc/sysconfig/msmtpd
|
||||||
|
mode: 0444
|
||||||
notify:
|
notify:
|
||||||
- test mail
|
- test mail
|
||||||
- restart msmtpd
|
- restart msmtpd
|
||||||
|
|
Loading…
Reference in a new issue