Add fail2ban role and clean up yaml lint noise

This commit is contained in:
2026-08-08 23:50:32 -05:00
parent 9b837dd780
commit 6c7ecfc724
352 changed files with 4632 additions and 4186 deletions
+3 -8
View File
@@ -1,16 +1,13 @@
---
language: python
python: "2.7"
python: '2.7'
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
packages: [python-pip]
install:
# Install ansible
- pip install ansible
@@ -20,10 +17,8 @@ install:
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
webhooks: https://galaxy.ansible.com/api/v1/notifications/
+1 -1
View File
@@ -1,4 +1,4 @@
---
# defaults file for ensure_dovecot
dovecot_vhost: '{{ inventory_hostname }}'
dovecot_quota: '1G'
dovecot_quota: 1G
+5 -7
View File
@@ -1,17 +1,17 @@
---
# handlers file for ensure_dovecot
- name: 'ensure_dovecot.package_facts'
- name: ensure_dovecot.package_facts
ansible.builtin.package_facts:
- name: 'ensure_dovecot.service_facts'
- name: ensure_dovecot.service_facts
ansible.builtin.service_facts:
- name: 'ensure_dovecot.service_reload'
- name: ensure_dovecot.service_reload
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts["service_mgr"] == 'systemd'
- ensure_dovecot is defined
ansible.builtin.systemd:
daemon_reload: 'yes'
- name: 'ensure_dovecot.service_restart'
- name: ensure_dovecot.service_restart
when:
- ansible_facts["system"] == 'Linux'
- ensure_dovecot is defined
@@ -21,9 +21,7 @@
ansible.builtin.service:
enabled: '{{ item.enabled }}'
name: '{{ item.name }}'
state: 'restarted'
state: restarted
loop: '{{ ensure_dovecot.service_list }}'
loop_control:
label: '{{ item.name }} will be restarted'
...
+1 -4
View File
@@ -1,3 +1,4 @@
---
galaxy_info:
author: your name
description: your role description
@@ -15,7 +16,6 @@ galaxy_info:
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)
min_ansible_version: 2.9
# If this a Container Enabled role, provide the minimum Ansible Container version.
@@ -38,7 +38,6 @@ galaxy_info:
# - 1.0
# - 7
# - 99.99
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
@@ -46,8 +45,6 @@ galaxy_info:
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
+45 -47
View File
@@ -1,35 +1,37 @@
---
# tasks file for ensure_dovecot
- name: 'include variables'
when:
- ansible_facts["system"] == 'Linux'
- name: include variables
when: ["ansible_facts[\"system\"] == 'Linux'"]
ansible.builtin.include_vars:
file: '{{ lookup("first_found", findme) }}'
name: 'ensure_dovecot'
name: ensure_dovecot
vars:
findme:
files:
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"]
}}-{{ ansible_facts["architecture"] }}.yml'
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"]
}}-default.yml'
- '{{ ansible_facts["distribution"] }}-default.yml'
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"]
}}-{{ ansible_facts["architecture"] }}.yml'
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"]
}}-default.yml'
- '{{ ansible_facts["os_family"] }}-default.yml'
- 'default.yml'
paths:
- '../vars/'
errors: 'ignore'
- name: 'package discovery'
- default.yml
paths: [../vars/]
errors: ignore
- name: package discovery
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts["packages"] is not defined
ansible.builtin.package_facts:
- name: 'service discovery'
- name: service discovery
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts["services"] is not defined
ansible.builtin.service_facts:
- name: 'ensure sysctl'
- name: ensure sysctl
when:
- ansible_facts["system"] == 'Linux'
- ensure_dovecot is defined
@@ -46,11 +48,11 @@
loop_control:
label: '{{ item.name }} will be {{ item.value }}'
notify:
- 'ensure_dovecot.package_facts'
- 'ensure_dovecot.service_facts'
- 'ensure_dovecot.service_reload'
- 'ensure_dovecot.service_restart'
- name: 'ensure packages'
- ensure_dovecot.package_facts
- ensure_dovecot.service_facts
- ensure_dovecot.service_reload
- ensure_dovecot.service_restart
- name: ensure packages
when:
- ansible_facts["system"] == 'Linux'
- ensure_dovecot is defined
@@ -63,11 +65,11 @@
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_dovecot.package_facts'
- 'ensure_dovecot.service_facts'
- 'ensure_dovecot.service_reload'
- 'ensure_dovecot.service_restart'
- name: 'ensure seboolean'
- ensure_dovecot.package_facts
- ensure_dovecot.service_facts
- ensure_dovecot.service_reload
- ensure_dovecot.service_restart
- name: ensure seboolean
when:
- ansible_facts["system"] == 'Linux'
- ensure_dovecot is defined
@@ -81,11 +83,11 @@
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_dovecot.package_facts'
- 'ensure_dovecot.service_facts'
- 'ensure_dovecot.service_reload'
- 'ensure_dovecot.service_restart'
- name: 'ensure configurations'
- ensure_dovecot.package_facts
- ensure_dovecot.service_facts
- ensure_dovecot.service_reload
- ensure_dovecot.service_restart
- name: ensure configurations
when:
- ansible_facts["system"] == 'Linux'
- ensure_dovecot is defined
@@ -106,11 +108,11 @@
loop_control:
label: '{{ item.dest }} will be ensured'
notify:
- 'ensure_dovecot.package_facts'
- 'ensure_dovecot.service_facts'
- 'ensure_dovecot.service_reload'
- 'ensure_dovecot.service_restart'
- name: 'ensure firewall'
- ensure_dovecot.package_facts
- ensure_dovecot.service_facts
- ensure_dovecot.service_reload
- ensure_dovecot.service_restart
- name: ensure firewall
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts.packages["firewalld"] is defined
@@ -126,11 +128,11 @@
loop_control:
label: '{{ item.service }} will be {{ item.state }}'
notify:
- 'ensure_dovecot.package_facts'
- 'ensure_dovecot.service_facts'
- 'ensure_dovecot.service_reload'
- 'ensure_dovecot.service_restart'
- name: 'ensure services'
- ensure_dovecot.package_facts
- ensure_dovecot.service_facts
- ensure_dovecot.service_reload
- ensure_dovecot.service_restart
- name: ensure services
when:
- ansible_facts["system"] == 'Linux'
- ensure_dovecot is defined
@@ -143,10 +145,6 @@
loop: '{{ ensure_dovecot.service_list }}'
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_dovecot.package_facts'
- 'ensure_dovecot.service_facts'
- name: 'flush handlers'
ansible.builtin.meta: 'flush_handlers'
...
notify: [ensure_dovecot.package_facts, ensure_dovecot.service_facts]
- name: flush handlers
ansible.builtin.meta: flush_handlers
+1 -2
View File
@@ -1,5 +1,4 @@
---
- hosts: localhost
remote_user: root
roles:
- ensure_dovecot
roles: [ensure_dovecot]
+119 -88
View File
@@ -1,100 +1,131 @@
---
# vars file for ensure_dovecot
package_list:
- name: 'dovecot'
state: 'present'
- name: 'dovecot-fts-xapian'
state: 'present'
- name: 'dovecot-mysql'
state: 'present'
- name: 'dovecot-pigeonhole'
state: 'present'
- name: dovecot
state: present
- name: dovecot-fts-xapian
state: present
- name: dovecot-mysql
state: present
- name: dovecot-pigeonhole
state: present
firewall_list:
- permanent: 'yes'
service: 'imap'
state: 'enabled'
service: imap
state: enabled
- permanent: 'yes'
service: 'imaps'
state: 'enabled'
service: imaps
state: enabled
service_list:
- enabled: 'yes'
name: 'dovecot.service'
state: 'started'
name: dovecot.service
state: started
- enabled: 'yes'
name: 'dovecot-copytls.service'
state: 'started'
name: dovecot-copytls.service
state: started
- enabled: 'yes'
name: 'dovecot-copytls.timer'
state: 'started'
name: dovecot-copytls.timer
state: started
template_list:
- dest: '/etc/dovecot/conf.d/10-auth.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/10-auth.conf'
- dest: '/etc/dovecot/conf.d/10-director.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/10-director.conf'
- dest: '/etc/dovecot/conf.d/10-logging.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/10-logging.conf'
- dest: '/etc/dovecot/conf.d/10-mail.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/10-mail.conf'
- dest: '/etc/dovecot/conf.d/10-master.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/10-master.conf'
- dest: '/etc/dovecot/conf.d/10-metrics.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/10-metrics.conf'
- dest: '/etc/dovecot/conf.d/10-ssl.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/10-ssl.conf'
- dest: '/etc/dovecot/conf.d/15-lda.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/15-lda.conf'
- dest: '/etc/dovecot/conf.d/15-mailboxes.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/15-mailboxes.conf'
- dest: '/etc/dovecot/conf.d/20-imap.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/20-imap.conf'
- dest: '/etc/dovecot/conf.d/20-lmtp.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/20-lmtp.conf'
- dest: '/etc/dovecot/conf.d/20-pop3.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/20-pop3.conf'
- dest: '/etc/dovecot/conf.d/20-submission.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/20-submission.conf'
- dest: '/etc/dovecot/conf.d/90-acl.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/90-acl.conf'
- dest: '/etc/dovecot/conf.d/90-plugin.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/90-plugin.conf'
- dest: '/etc/dovecot/conf.d/90-quota.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/90-quota.conf'
- dest: '/etc/dovecot/conf.d/auth-checkpassword.conf.ext'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/auth-checkpassword.conf.ext'
- dest: '/etc/dovecot/conf.d/auth-deny.conf.ext'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/auth-deny.conf.ext'
- dest: '/etc/dovecot/conf.d/auth-dict.conf.ext'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/auth-dict.conf.ext'
- dest: '/etc/dovecot/conf.d/auth-ldap.conf.ext'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/auth-ldap.conf.ext'
- dest: '/etc/dovecot/conf.d/auth-master.conf.ext'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/auth-master.conf.ext'
- dest: '/etc/dovecot/conf.d/auth-passwdfile.conf.ext'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/auth-passwdfile.conf.ext'
- dest: '/etc/dovecot/conf.d/auth-sql.conf.ext'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/auth-sql.conf.ext'
- dest: '/etc/dovecot/conf.d/auth-static.conf.ext'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/auth-static.conf.ext'
- dest: '/etc/dovecot/conf.d/auth-system.conf.ext'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/auth-system.conf.ext'
- dest: '/etc/dovecot/conf.d/20-managesieve.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/20-managesieve.conf'
- dest: '/etc/dovecot/conf.d/90-sieve-extprograms.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/90-sieve-extprograms.conf'
- dest: '/etc/dovecot/conf.d/90-sieve.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/90-sieve.conf'
- dest: '/etc/dovecot/dovecot.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/dovecot.conf'
- dest: '/etc/dovecot/local.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/local.conf'
- dest: '/etc/dovecot/accounts'
group: 'dovecot'
- dest: /etc/dovecot/conf.d/10-auth.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/10-auth.conf'
- dest: /etc/dovecot/conf.d/10-director.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/10-director.conf'
- dest: /etc/dovecot/conf.d/10-logging.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/10-logging.conf'
- dest: /etc/dovecot/conf.d/10-mail.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/10-mail.conf'
- dest: /etc/dovecot/conf.d/10-master.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/10-master.conf'
- dest: /etc/dovecot/conf.d/10-metrics.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/10-metrics.conf'
- dest: /etc/dovecot/conf.d/10-ssl.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/10-ssl.conf'
- dest: /etc/dovecot/conf.d/15-lda.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/15-lda.conf'
- dest: /etc/dovecot/conf.d/15-mailboxes.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/15-mailboxes.conf'
- dest: /etc/dovecot/conf.d/20-imap.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/20-imap.conf'
- dest: /etc/dovecot/conf.d/20-lmtp.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/20-lmtp.conf'
- dest: /etc/dovecot/conf.d/20-pop3.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/20-pop3.conf'
- dest: /etc/dovecot/conf.d/20-submission.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/20-submission.conf'
- dest: /etc/dovecot/conf.d/90-acl.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/90-acl.conf'
- dest: /etc/dovecot/conf.d/90-plugin.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/90-plugin.conf'
- dest: /etc/dovecot/conf.d/90-quota.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/90-quota.conf'
- dest: /etc/dovecot/conf.d/auth-checkpassword.conf.ext
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/auth-checkpassword.conf.ext'
- dest: /etc/dovecot/conf.d/auth-deny.conf.ext
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/auth-deny.conf.ext'
- dest: /etc/dovecot/conf.d/auth-dict.conf.ext
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/auth-dict.conf.ext'
- dest: /etc/dovecot/conf.d/auth-ldap.conf.ext
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/auth-ldap.conf.ext'
- dest: /etc/dovecot/conf.d/auth-master.conf.ext
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/auth-master.conf.ext'
- dest: /etc/dovecot/conf.d/auth-passwdfile.conf.ext
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/auth-passwdfile.conf.ext'
- dest: /etc/dovecot/conf.d/auth-sql.conf.ext
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/auth-sql.conf.ext'
- dest: /etc/dovecot/conf.d/auth-static.conf.ext
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/auth-static.conf.ext'
- dest: /etc/dovecot/conf.d/auth-system.conf.ext
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/auth-system.conf.ext'
- dest: /etc/dovecot/conf.d/20-managesieve.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/20-managesieve.conf'
- dest: /etc/dovecot/conf.d/90-sieve-extprograms.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/90-sieve-extprograms.conf'
- dest: /etc/dovecot/conf.d/90-sieve.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/90-sieve.conf'
- dest: /etc/dovecot/dovecot.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/dovecot.conf'
- dest: /etc/dovecot/local.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/local.conf'
- dest: /etc/dovecot/accounts
group: dovecot
mode: '0600'
owner: 'dovecot'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/accounts'
- dest: '/usr/lib/systemd/system/dovecot-copytls.service'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/dovecot-copytls.service'
- dest: '/usr/lib/systemd/system/dovecot-copytls.timer'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/dovecot-copytls.timer'
...
owner: dovecot
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/accounts'
- dest: /usr/lib/systemd/system/dovecot-copytls.service
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/dovecot-copytls.service'
- dest: /usr/lib/systemd/system/dovecot-copytls.timer
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/dovecot-copytls.timer'
+35 -32
View File
@@ -1,44 +1,47 @@
---
# vars file for ensure_dovecot
package_list:
- name: 'dovecot'
state: 'present'
- name: 'dovecot-fts-xapian'
state: 'present'
- name: 'dovecot-mysql'
state: 'present'
- name: 'dovecot-pigeonhole'
state: 'present'
- name: dovecot
state: present
- name: dovecot-fts-xapian
state: present
- name: dovecot-mysql
state: present
- name: dovecot-pigeonhole
state: present
firewall_list:
- permanent: 'yes'
service: 'imap'
state: 'enabled'
service: imap
state: enabled
- permanent: 'yes'
service: 'imaps'
state: 'enabled'
service: imaps
state: enabled
service_list:
- enabled: 'yes'
name: 'dovecot.service'
state: 'started'
name: dovecot.service
state: started
- enabled: 'yes'
name: 'dovecot-copytls.service'
state: 'started'
name: dovecot-copytls.service
state: started
- enabled: 'yes'
name: 'dovecot-copytls.timer'
state: 'started'
name: dovecot-copytls.timer
state: started
template_list:
- dest: '/etc/dovecot/dovecot.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/dovecot.conf'
- dest: '/etc/dovecot/conf.d/local.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/local.conf'
- dest: '/etc/dovecot/accounts'
group: 'dovecot'
- dest: /etc/dovecot/dovecot.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/dovecot.conf'
- dest: /etc/dovecot/conf.d/local.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/local.conf'
- dest: /etc/dovecot/accounts
group: dovecot
mode: '0600'
owner: 'dovecot'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/accounts'
- dest: '/usr/lib/systemd/system/dovecot-copytls.service'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/dovecot-copytls.service'
- dest: '/usr/lib/systemd/system/dovecot-copytls.timer'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/dovecot-copytls.timer'
...
owner: dovecot
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/accounts'
- dest: /usr/lib/systemd/system/dovecot-copytls.service
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/dovecot-copytls.service'
- dest: /usr/lib/systemd/system/dovecot-copytls.timer
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/dovecot-copytls.timer'
+35 -31
View File
@@ -1,43 +1,47 @@
---
# vars file for ensure_dovecot
package_list:
- name: 'dovecot'
state: 'present'
- name: 'dovecot-fts-xapian'
state: 'present'
- name: 'dovecot-mysql'
state: 'present'
- name: 'dovecot-pigeonhole'
state: 'present'
- name: dovecot
state: present
- name: dovecot-fts-xapian
state: present
- name: dovecot-mysql
state: present
- name: dovecot-pigeonhole
state: present
firewall_list:
- permanent: 'yes'
service: 'imap'
state: 'enabled'
service: imap
state: enabled
- permanent: 'yes'
service: 'imaps'
state: 'enabled'
service: imaps
state: enabled
service_list:
- enabled: 'yes'
name: 'dovecot.service'
state: 'started'
name: dovecot.service
state: started
- enabled: 'yes'
name: 'dovecot-copytls.service'
state: 'started'
name: dovecot-copytls.service
state: started
- enabled: 'yes'
name: 'dovecot-copytls.timer'
state: 'started'
name: dovecot-copytls.timer
state: started
template_list:
- dest: '/etc/dovecot/dovecot.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/dovecot.conf'
- dest: '/etc/dovecot/conf.d/local.conf'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/conf.d/local.conf'
- dest: '/etc/dovecot/accounts'
group: 'dovecot'
- dest: /etc/dovecot/dovecot.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/dovecot.conf'
- dest: /etc/dovecot/conf.d/local.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/conf.d/local.conf'
- dest: /etc/dovecot/accounts
group: dovecot
mode: '0600'
owner: 'dovecot'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/dovecot/accounts'
- dest: '/usr/lib/systemd/system/dovecot-copytls.service'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/dovecot-copytls.service'
- dest: '/usr/lib/systemd/system/dovecot-copytls.timer'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/dovecot-copytls.timer'
...
owner: dovecot
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/dovecot/accounts'
- dest: /usr/lib/systemd/system/dovecot-copytls.service
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/dovecot-copytls.service'
- dest: /usr/lib/systemd/system/dovecot-copytls.timer
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/dovecot-copytls.timer'
+1 -1
View File
@@ -1,2 +1,2 @@
---
# vars file for ensure_dovecot
...
+1 -1
View File
@@ -1,2 +1,2 @@
---
# vars file for ensure_dovecot
...