Update to trixie
This commit is contained in:
parent
3686d35108
commit
fbfb04717a
48 changed files with 914 additions and 2216 deletions
|
|
@ -1,70 +1,76 @@
|
|||
- name: install postfix packages
|
||||
apt:
|
||||
- name: Install postfix packages
|
||||
ansible.builtin.apt:
|
||||
name: postfix,postfix-pgsql,postfix-doc
|
||||
state: present
|
||||
update_cache: yes
|
||||
install_recommends: no
|
||||
update_cache: true
|
||||
install_recommends: false
|
||||
|
||||
- name: divert /etc/postfix/main.cf
|
||||
shell: dpkg-divert --add --rename --divert /etc/postfix/main.cf.orig /etc/postfix/main.cf
|
||||
- name: Divert /etc/postfix/main.cf
|
||||
community.general.dpkg_divert:
|
||||
path: /etc/postfix/main.cf
|
||||
divert: /etc/postfix/main.cf.orig
|
||||
rename: true
|
||||
|
||||
- name: divert /etc/postfix/master.cf
|
||||
shell: dpkg-divert --add --rename --divert /etc/postfix/master.cf.orig /etc/postfix/master.cf
|
||||
- name: Divert /etc/postfix/master.cf
|
||||
community.general.dpkg_divert:
|
||||
path: /etc/postfix/master.cf
|
||||
divert: /etc/postfix/master.cf.orig
|
||||
rename: true
|
||||
|
||||
- name: group 'mailstore'
|
||||
group:
|
||||
- name: Group 'mailstore'
|
||||
ansible.builtin.group:
|
||||
name: mailstore
|
||||
state: present
|
||||
system: yes
|
||||
system: true
|
||||
gid: 5000
|
||||
|
||||
- name: user 'mailstore'
|
||||
user:
|
||||
- name: User 'mailstore'
|
||||
ansible.builtin.user:
|
||||
name: mailstore
|
||||
group: mailstore
|
||||
state: present
|
||||
shell: /usr/sbin/nologin
|
||||
system: yes
|
||||
system: true
|
||||
uid: 5000
|
||||
create_home: no
|
||||
create_home: false
|
||||
home: /srv/mailstore
|
||||
password: '!'
|
||||
password_lock: yes
|
||||
password_lock: true
|
||||
comment: created by ansible
|
||||
|
||||
- name: directories /srv/mailstore /srv/mailstore/role_specific
|
||||
file:
|
||||
- name: Directories /srv/mailstore /srv/mailstore/role_specific
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: mailstore
|
||||
group: mailstore
|
||||
mode: 0755
|
||||
mode: "0755"
|
||||
loop:
|
||||
- /srv/mailstore
|
||||
- /srv/mailstore/role_specific
|
||||
- /srv/mailstore/role_specific/roles
|
||||
|
||||
- name: postfix configuration files
|
||||
template:
|
||||
- name: Postfix configuration files
|
||||
ansible.builtin.template:
|
||||
src: "postfix/{{ item }}"
|
||||
dest: "/etc/postfix/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
force: "{{ mailserver.postfix.overwrite_config }}"
|
||||
loop:
|
||||
- main.cf
|
||||
- master.cf
|
||||
- header_checks
|
||||
|
||||
- name: postfix database queries
|
||||
template:
|
||||
- name: Postfix database queries
|
||||
ansible.builtin.template:
|
||||
src: "postfix/{{ item }}"
|
||||
dest: "/etc/postfix/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
force: yes
|
||||
mode: "0600"
|
||||
force: true
|
||||
loop:
|
||||
- domains.cf
|
||||
- mailboxes.cf
|
||||
|
|
@ -76,7 +82,7 @@
|
|||
- sender_canonical_maps.cf
|
||||
- recipient_canonical_maps.cf
|
||||
|
||||
- name: restart postfix
|
||||
systemd:
|
||||
- name: Restart postfix
|
||||
ansible.builtin.systemd:
|
||||
name: postfix
|
||||
state: restarted
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue