style: make ansible-lint happier

This commit is contained in:
VC
2024-07-05 11:53:33 +02:00
parent 30ec08487f
commit a0b23684a5
4 changed files with 42 additions and 34 deletions

View File

@@ -1,14 +1,18 @@
---
- name: postmap virtual-regexp
command: postmap /etc/postfix/virtual-regexp
listen: "postmap files"
- name: Postmap virtual-regexp
ansible.builtin.command:
cmd: postmap /etc/postfix/virtual-regexp
changed_when: true
listen: "Postmap files"
- name: postmap transport
command: postmap /etc/postfix/transport
listen: "postmap files"
- name: Postmap transport
ansible.builtin.command:
cmd: postmap /etc/postfix/transport
changed_when: true
listen: "Postmap files"
- name: restart postfix
service:
- name: Restart postfix
ansible.builtin.service:
name: postfix
state: restarted

View File

@@ -1,38 +1,40 @@
---
- name: install postfix
package:
- name: Install postfix
ansible.builtin.package:
name: postfix
state: present
- name: install mailutils
package:
- name: Install mailutils
ansible.builtin.package:
name: mailutils
state: present
- name: main configuration files
copy:
- name: Main configuration files
ansible.builtin.copy:
src: "./files/{{ item }}"
dest: "/etc/postfix/{{ item }}"
mode: 0644
loop:
- main.cf
- master.cf
notify:
- restart postfix
- Restart postfix
- name: map files
copy:
- name: Map files
ansible.builtin.copy:
src: "./files/{{ item }}"
dest: "/etc/postfix/{{ item }}"
mode: 0644
loop:
- transport
- virtual-regexp
notify:
- postmap files
- restart postfix
- Postmap files
- Restart postfix
- name: mail generation script
copy:
- name: Mail generation script
ansible.builtin.copy:
src: ./files/generate_email.sh
dest: /usr/local/bin/generate_email.sh
owner: root