Changeset - f05039c7d383
[Not reviewed]
0 4 3
Branko Majic (branko) - 8 years ago 2016-01-06 23:08:12
branko@majic.rs
MAR-44: Implemented backup support for the mail server role.
7 files changed with 31 insertions and 1 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -762,6 +762,17 @@ doing look-ups:
 
  group-based granting of mail services to users.
 

	
 

	
 
Backups
 
~~~~~~~
 

	
 
If the backup for this role has been enabled, the following paths are backed-up:
 

	
 
**/var/{{ mail_user }}**
 
  All data stored by the mail server, including mails and Sieve scripts. Keep in
 
  mind that list of available users and their credentials are stored in the LDAP
 
  directory (which is backed-up via LDAP server role).
 

	
 

	
 
Parameters
 
~~~~~~~~~~
 

	
roles/mail_server/defaults/main.yml
Show inline comments
 
---
 

	
 
enable_backup: False
 
mail_ldap_tls_truststore: "/etc/ssl/certs/truststore.pem"
 
mail_user: vmail
 
imap_tls_certificate: "{{ tls_certificate_dir }}/{{ ansible_fqdn }}_imap.pem"
roles/mail_server/meta/main.yml
Show inline comments
 
new file 100644
 
---
 

	
 
dependencies:
 
  - role: backup_client
 
    when: enable_backup
 
\ No newline at end of file
roles/mail_server/tasks/backup.yml
Show inline comments
 
new file 100644
 
---
 

	
 
- name: Deploy include patterns to backup
 
  template: src="backup_patterns.j2" dest="/etc/duply/main/patterns/mail_server"
 
            owner="root" group="root" mode="700"
 
  notify:
 
    - Assemble Duply include patterns
 
\ No newline at end of file
roles/mail_server/tasks/main.yml
Show inline comments
 
@@ -138,4 +138,8 @@
 
- name: Deploy firewall configuration for mail server
 
  copy: src="ferm_mail.conf" dest="/etc/ferm/conf.d/20-mail.conf" owner=root group=root mode=640
 
  notify:
 
    - Restart ferm
 
\ No newline at end of file
 
    - Restart ferm
 

	
 
- name: Enable backup
 
  include: backup.yml
 
  when: enable_backup
 
\ No newline at end of file
roles/mail_server/templates/backup_patterns.j2
Show inline comments
 
new file 100644
 
/var/{{ mail_user }}
roles/xmpp_server/defaults/main.yml
Show inline comments
 
---
 

	
 
enable_backup: False
 
xmpp_domains: "{{ ansible_domain }}"
 
xmpp_tls_certificate: "{{ tls_certificate_dir }}/{{ ansible_fqdn }}_xmpp.pem"
 
xmpp_tls_key: "{{ tls_private_key_dir }}/{{ ansible_fqdn }}_xmpp.key"
0 comments (0 inline, 0 general)