zimbra/tasks/main.yml

49 lines
1.5 KiB
YAML

---
#
# Validations before run the playbook
################################################################################
- name: Checking if there is an Zimbra OSE install already
command: getent passwd zimbra
register: getent_passwd
ignore_errors: true
#
# Installation process
################################################################################
- import_tasks: 'vars/{{zimbra_version}}.yml'
when: getent_passwd.rc == 2
- import_tasks: 'install/dependencies.yml'
when: getent_passwd.rc == 2
- import_tasks: 'install/zimbra.yml'
when: getent_passwd.rc == 2
- import_tasks: 'install/policyd.yml'
when: zimbra_policyd == 'y'
#
# Configuration process
################################################################################
- import_tasks: 'configure/proxy.yml'
when: zimbra_proxy == 'y'
- import_tasks: 'configure/mailbox.yml'
when: zimbra_store == 'y'
- import_tasks: 'configure/mta.yml'
when: zimbra_mta == 'y'
#
# Extras configuration process
################################################################################
- import_tasks: 'extras/modify-logo.yml'
when: zmlogologin is defined and zmlogoapp is defined
#
# Restarting Zimbra
################################################################################
- name: 'Reloading Zimbra OSE Services'
shell: source /opt/zimbra/.bashrc && ./zmcontrol restart
args:
executable: /bin/bash
chdir: '/opt/zimbra/bin/'
become: yes
become_user: zimbra
retries: 3