From 3bda4ac1e6a52b61eff75e944cfaff666a427da0 Mon Sep 17 00:00:00 2001 From: Lucas Costa Beyeler Date: Tue, 16 Oct 2018 22:44:11 +0100 Subject: [PATCH] Including variable to inform Zimbra version Now you can set which version of Zimbra you want to use. For now only versions 8.8.5 to 8.8.10 is available. For the future, old versions will be included too! --- README.md | 3 ++- tasks/main.yml | 2 +- tasks/vars/8.8.10.yml | 22 ++++++++++++++++++++++ tasks/vars/8.8.5.yml | 22 ++++++++++++++++++++++ tasks/vars/8.8.6.yml | 22 ++++++++++++++++++++++ tasks/vars/8.8.7.yml | 22 ++++++++++++++++++++++ tasks/{install/vars.yml => vars/8.8.8.yml} | 2 +- tasks/vars/8.8.9.yml | 22 ++++++++++++++++++++++ vars/main.yml | 5 +++++ 9 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 tasks/vars/8.8.10.yml create mode 100644 tasks/vars/8.8.5.yml create mode 100644 tasks/vars/8.8.6.yml create mode 100644 tasks/vars/8.8.7.yml rename tasks/{install/vars.yml => vars/8.8.8.yml} (98%) create mode 100644 tasks/vars/8.8.9.yml diff --git a/README.md b/README.md index 48758ad..ef55d29 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Zimbra Non-Official ansible role to install and configure Zimbra Collaboration Open Source Edition on Red Hat, CentOS and Ubuntu Server. [![Build Status](https://travis-ci.org/lucascbeyeler/zimbra.svg?branch=master)](https://travis-ci.org/lucascbeyeler/zimbra) -[![Zimbra Version](https://img.shields.io/badge/Zimbra-8.8.8-blue.svg)](https://www.zimbra.com/downloads/zimbra-collaboration-open-source/) +[![Zimbra Version](https://img.shields.io/badge/Zimbra-8.8.10-blue.svg)](https://www.zimbra.com/downloads/zimbra-collaboration-open-source/) ![Linux Distro](https://img.shields.io/badge/platform-CentOS%20%7C%20Red%20Hat%20%7C%20Ubuntu-blue.svg) ![Branch](https://img.shields.io/badge/Branch-Master-green.svg) [![Ansible Version](https://img.shields.io/badge/Ansible-2.4.2.0-green.svg)](https://www.ansible.com/) @@ -53,6 +53,7 @@ Role Variables * **zmlogologin:** Inform the path for your logo (Login Screen) - don't inform and no image will be applied; * **zmlogoapp:** Inform the path for your logo (Application Screen) - don't inform and no image will be applied; * **timezone:** inform the timezone the playbook should set in your server; +* **zimbra_version:** Inform which version of Zimbra you want to install. Default: 8.8.10 Service Variables - Inform "y" or "n" -------------- diff --git a/tasks/main.yml b/tasks/main.yml index ccedbc6..ab137f4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,7 +10,7 @@ # # Installation process ################################################################################ -- import_tasks: 'install/vars.yml' +- import_tasks: 'vars/{{zimbra_version}}.yml' when: getent_passwd.rc == 2 - import_tasks: 'install/dependencies.yml' when: getent_passwd.rc == 2 diff --git a/tasks/vars/8.8.10.yml b/tasks/vars/8.8.10.yml new file mode 100644 index 0000000..b9a496f --- /dev/null +++ b/tasks/vars/8.8.10.yml @@ -0,0 +1,22 @@ +--- +# +# Setting variables +################################################################################ +- name: Loading the address to the most recent release of Zimbra OSE (8.8.10) + set_fact: zmurl=https://files.zimbra.com/downloads/8.8.10_GA/ + +- name: Check if your distro is Ubuntu Server 16.04 LTS + set_fact: zmpkg=zcs-8.8.10_GA_3039.UBUNTU16_64.20180928094617 + when: ansible_distribution_major_version|int >= 16 + +- name: Check if your distro is Ubuntu Server 14.04 LTS + set_fact: zmpkg=zcs-8.8.10_GA_3039.UBUNTU14_64.20180928094617 + when: ansible_distribution_major_version|int >= 14 and ansible_distribution_major_version|int <= 15 + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 6) + set_fact: zmpkg=zcs-8.8.10_GA_3039.RHEL6_64.20180928094617 + when: ansible_distribution_major_version == "6" + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 7) + set_fact: zmpkg=zcs-8.8.10_GA_3039.RHEL7_64.20180928094617 + when: ansible_distribution_major_version == "7" diff --git a/tasks/vars/8.8.5.yml b/tasks/vars/8.8.5.yml new file mode 100644 index 0000000..5bdbd72 --- /dev/null +++ b/tasks/vars/8.8.5.yml @@ -0,0 +1,22 @@ +--- +# +# Setting variables +################################################################################ +- name: Loading the address to the most recent release of Zimbra OSE (8.8.5) + set_fact: zmurl=https://files.zimbra.com/downloads/8.8.5_GA/ + +- name: Check if your distro is Ubuntu Server 16.04 LTS + set_fact: zmpkg=zcs-8.8.5_GA_1894.UBUNTU16_64.20171026035615 + when: ansible_distribution_major_version|int >= 16 + +- name: Check if your distro is Ubuntu Server 14.04 LTS + set_fact: zmpkg=zcs-8.8.5_GA_1894.UBUNTU14_64.20171026035615 + when: ansible_distribution_major_version|int >= 14 and ansible_distribution_major_version|int <= 15 + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 6) + set_fact: zmpkg=zcs-8.8.5_GA_1894.RHEL6_64.20171026035615 + when: ansible_distribution_major_version == "6" + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 7) + set_fact: zmpkg=zcs-8.8.5_GA_1894.RHEL7_64.20171026035615 + when: ansible_distribution_major_version == "7" diff --git a/tasks/vars/8.8.6.yml b/tasks/vars/8.8.6.yml new file mode 100644 index 0000000..3d02d2a --- /dev/null +++ b/tasks/vars/8.8.6.yml @@ -0,0 +1,22 @@ +--- +# +# Setting variables +################################################################################ +- name: Loading the address to the most recent release of Zimbra OSE (8.8.6) + set_fact: zmurl=https://files.zimbra.com/downloads/8.8.6_GA/ + +- name: Check if your distro is Ubuntu Server 16.04 LTS + set_fact: zmpkg=zcs-8.8.6_GA_1906.UBUNTU16_64.20171130041047 + when: ansible_distribution_major_version|int >= 16 + +- name: Check if your distro is Ubuntu Server 14.04 LTS + set_fact: zmpkg=zcs-8.8.6_GA_1906.UBUNTU14_64.20171130041047 + when: ansible_distribution_major_version|int >= 14 and ansible_distribution_major_version|int <= 15 + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 6) + set_fact: zmpkg=zcs-8.8.6_GA_1906.RHEL6_64.20171130041047 + when: ansible_distribution_major_version == "6" + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 7) + set_fact: zmpkg=zcs-8.8.6_GA_1906.RHEL7_64.20171130041047 + when: ansible_distribution_major_version == "7" diff --git a/tasks/vars/8.8.7.yml b/tasks/vars/8.8.7.yml new file mode 100644 index 0000000..57ee962 --- /dev/null +++ b/tasks/vars/8.8.7.yml @@ -0,0 +1,22 @@ +--- +# +# Setting variables +################################################################################ +- name: Loading the address to the most recent release of Zimbra OSE (8.8.7) + set_fact: zmurl=https://files.zimbra.com/downloads/8.8.7_GA/ + +- name: Check if your distro is Ubuntu Server 16.04 LTS + set_fact: zmpkg=zcs-8.8.7_GA_1964.UBUNTU16_64.20180223145016 + when: ansible_distribution_major_version|int >= 16 + +- name: Check if your distro is Ubuntu Server 14.04 LTS + set_fact: zmpkg=zcs-8.8.7_GA_1964.UBUNTU14_64.20180223145016 + when: ansible_distribution_major_version|int >= 14 and ansible_distribution_major_version|int <= 15 + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 6) + set_fact: zmpkg=zcs-8.8.7_GA_1964.RHEL6_64.20180223145016 + when: ansible_distribution_major_version == "6" + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 7) + set_fact: zmpkg=zcs-8.8.7_GA_1964.RHEL7_64.20180223145016 + when: ansible_distribution_major_version == "7" diff --git a/tasks/install/vars.yml b/tasks/vars/8.8.8.yml similarity index 98% rename from tasks/install/vars.yml rename to tasks/vars/8.8.8.yml index d9d2f56..e6e8ac5 100644 --- a/tasks/install/vars.yml +++ b/tasks/vars/8.8.8.yml @@ -2,7 +2,7 @@ # # Setting variables ################################################################################ -- name: Loading the address to the most recent release of Zimbra OSE (8.8.5) +- name: Loading the address to the most recent release of Zimbra OSE (8.8.8) set_fact: zmurl=https://files.zimbra.com/downloads/8.8.8_GA/ - name: Check if your distro is Ubuntu Server 16.04 LTS diff --git a/tasks/vars/8.8.9.yml b/tasks/vars/8.8.9.yml new file mode 100644 index 0000000..917797b --- /dev/null +++ b/tasks/vars/8.8.9.yml @@ -0,0 +1,22 @@ +--- +# +# Setting variables +################################################################################ +- name: Loading the address to the most recent release of Zimbra OSE (8.8.9) + set_fact: zmurl=https://files.zimbra.com/downloads/8.8.9_GA/ + +- name: Check if your distro is Ubuntu Server 16.04 LTS + set_fact: zmpkg=zcs-8.8.9_GA_3019.UBUNTU16_64.20180809160254 + when: ansible_distribution_major_version|int >= 16 + +- name: Check if your distro is Ubuntu Server 14.04 LTS + set_fact: zmpkg=zcs-8.8.9_GA_3019.UBUNTU14_64.20180809160254 + when: ansible_distribution_major_version|int >= 14 and ansible_distribution_major_version|int <= 15 + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 6) + set_fact: zmpkg=zcs-8.8.9_GA_3019.RHEL6_64.20180809160254 + when: ansible_distribution_major_version == "6" + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 7) + set_fact: zmpkg=zcs-8.8.9_GA_3019.RHEL7_64.20180809160254 + when: ansible_distribution_major_version == "7" diff --git a/vars/main.yml b/vars/main.yml index 6aa8668..c3b1917 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -26,3 +26,8 @@ domain: "localdomain" zmpasswd: "!23Change" zmnetwork: "192.168.200.0/8" timezone: UTC + +# +# Zimbra configuration +################################################################################ +zimbra_version: 8.8.10