diff --git a/defaults/main.yml b/defaults/main.yml index f819fa1..8e72ffb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -45,6 +45,8 @@ timezone: UTC ################################################################################ zimbra_version: 8.8.15 +zimbra_upgrade: false + zm_repo: 8.8.15: url: https://files.zimbra.com/downloads/8.8.15_GA/ diff --git a/tasks/install/zimbra.yml b/tasks/install/zimbra.yml index 5f07580..4aa1a8c 100644 --- a/tasks/install/zimbra.yml +++ b/tasks/install/zimbra.yml @@ -29,7 +29,7 @@ - name: Uploading keystroke file template: - src: 'installZimbra-keystrokes' + src: "{{ 'installZimbra-keystrokes' if not zimbra_upgrade else 'installZimbraUpgrade-keystrokes' }}" dest: /tmp/zcs/installZimbra-keystrokes owner: root group: root @@ -49,6 +49,6 @@ chdir: '/usr/local/src/{{ zm_pkg }}/' - name: Configuring Zimbra OSE's services for use - command: ./zmsetup.pl -c /tmp/zcs/installZimbraScript + command: ./zmsetup.pl {{ '-c /tmp/zcs/installZimbraScript' if not zimbra_upgrade }} args: chdir: /opt/zimbra/libexec/ diff --git a/tasks/main.yml b/tasks/main.yml index f577fe9..7a417bc 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,9 +11,9 @@ # Installation process ################################################################################ - import_tasks: 'install/dependencies.yml' - when: getent_passwd.rc == 2 + when: getent_passwd.rc == 2 or zimbra_upgrade - import_tasks: 'install/zimbra.yml' - when: getent_passwd.rc == 2 + when: getent_passwd.rc == 2 or zimbra_upgrade - import_tasks: 'install/policyd.yml' when: zimbra_policyd == 'y' @@ -21,11 +21,11 @@ # Configuration process ################################################################################ - import_tasks: 'configure/proxy.yml' - when: zimbra_proxy == 'y' + when: zimbra_proxy == 'y' and not zimbra_upgrade - import_tasks: 'configure/mailbox.yml' - when: zimbra_store == 'y' + when: zimbra_store == 'y' and not zimbra_upgrade - import_tasks: 'configure/mta.yml' - when: zimbra_mta == 'y' + when: zimbra_mta == 'y' and not zimbra_upgrade - import_tasks: 'configure/disable_existing_dns_stub_listener.yml' when: zimbra_dnscache == 'y' and disable_existing_dns_stub_listener == 'y' diff --git a/templates/installZimbraUpgrade-keystrokes b/templates/installZimbraUpgrade-keystrokes new file mode 100644 index 0000000..3524cf2 --- /dev/null +++ b/templates/installZimbraUpgrade-keystrokes @@ -0,0 +1,5 @@ +y +n +y +y +y \ No newline at end of file