opensmtpd: ansible-lint fixes

This commit is contained in:
Timo Makinen 2022-10-30 16:04:41 +00:00
parent 67a6dd1545
commit 999026a8bc
2 changed files with 8 additions and 13 deletions

View file

@ -1,5 +1,5 @@
---
- name: restart opensmtpd
service:
- name: Restart opensmtpd
ansible.builtin.service:
name: smtpd
state: restarted

View file

@ -1,11 +1,6 @@
---
- name: check support
fail:
msg: Role not supported in your system
when: ansible_os_family != "OpenBSD"
- name: create smtpd.conf from template
template:
- name: Create smtpd.conf from template
ansible.builtin.template:
src: smtpd.conf.j2
dest: /etc/mail/smtpd.conf
mode: 0644
@ -13,8 +8,8 @@
group: "{{ ansible_wheel }}"
notify: restart opensmtpd
- name: force server name to domain name
copy:
- name: Force server name to domain name
ansible.builtin.copy:
content: "{{ mail_domain }}\n"
dest: /etc/mail//mailname
mode: 0644
@ -22,8 +17,8 @@
group: "{{ ansible_wheel }}"
notify: restart opensmtpd
- name: enable opensmtpd
service:
- name: Enable opensmtpd
ansible.builtin.service:
name: smtpd
state: started
enabled: true