From 15c48761d54e97a4311fb771b51b2b0182aa1cc9 Mon Sep 17 00:00:00 2001 From: Romina Brown Date: Thu, 7 May 2026 15:18:01 -0300 Subject: [PATCH] =?UTF-8?q?Instalaci=C3=B3n=20Zimbra=2010.x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 +++++++++++++++ defaults/main.yml | 19 ++++++++++++++++- tasks/install/zimbra.yml | 12 +++++++---- tasks/main.yml | 2 -- tasks/vars/8.8.15.yml | 34 ------------------------------ templates/installZimbra-keystrokes | 2 ++ 6 files changed, 45 insertions(+), 41 deletions(-) delete mode 100644 tasks/vars/8.8.15.yml diff --git a/README.md b/README.md index 9091196..fb78f1d 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,23 @@ Role Variables * **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.15 +* **zm_repo:** Variable to inform which repository of Zimbra builds you want to download from. You need to set **url**, and a dictonary of **builds** according to distribution and distribution version. +Example: +``` +zm_repo: + 10.1.15: + url: https://example.repositorio.zimbra + builds: + ubuntu: + 20: zcs-10.1.15_GA_0425.UBUNTU20_64... + 22: zcs-10.1.15_GA_0425.UBUNTU22_64.... + redhat: + 8: ... + 9: ... + centos: + 8: ... + 9: ... +``` Service Variables - Inform "y" or "n" -------------- diff --git a/defaults/main.yml b/defaults/main.yml index 7d9d629..1e33a38 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -41,7 +41,24 @@ timezone: UTC # - "198.162.1.3 {{ hostname }}.{{ domain }} {{ hostname }}" # -# Zimbra configuration +# Zimbra repository ################################################################################ zimbra_version: 8.8.15 +zm_repo: + 8.8.15: + url: https://files.zimbra.com/downloads/8.8.15_GA/ + builds: + ubuntu: + 14: zcs-8.8.15_GA_3869.UBUNTU14_64.20190918004220 + 16: zcs-8.8.15_GA_3869.UBUNTU16_64.20190918004220 + 18: zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220 + 20: zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954 + redhat: + 6: zcs-8.8.15_GA_3869.RHEL6_64.20190918004220 + 7: zcs-8.8.15_GA_3869.RHEL7_64.20190918004220 + 8: zcs-8.8.15_GA_3953.RHEL8_64.20200629025823 + centos: + 6: zcs-8.8.15_GA_3869.RHEL6_64.20190918004220 + 7: zcs-8.8.15_GA_3869.RHEL7_64.20190918004220 + 8: zcs-8.8.15_GA_3953.RHEL8_64.20200629025823 diff --git a/tasks/install/zimbra.yml b/tasks/install/zimbra.yml index e93a486..5f07580 100644 --- a/tasks/install/zimbra.yml +++ b/tasks/install/zimbra.yml @@ -10,11 +10,15 @@ state: present with_items: "{{ hosts_lines }}" when: hosts_lines is defined + +- name: Set Zimbra OSE {{ zimbra_version }} build name + set_fact: + zm_pkg: "{{ zm_repo[zimbra_version].builds[ansible_distribution | lower][ansible_distribution_major_version | int] }}" -- name: Download and unpacking Zimbra OSE +- name: Download and unpacking Zimbra OSE {{ zimbra_version }} unarchive: validate_certs: no - src: '{{ zmurl }}{{ zmpkg }}.tgz' + src: '{{ zm_repo[zimbra_version].url }}{{ zm_pkg }}.tgz' dest: /usr/local/src/ copy: no @@ -39,10 +43,10 @@ group: root mode: 0644 -- name: Installing Zimbra OSE +- name: Installing Zimbra OSE {{ zimbra_version }} shell: ./install.sh -s < /tmp/zcs/installZimbra-keystrokes args: - chdir: '/usr/local/src/{{ zmpkg }}/' + chdir: '/usr/local/src/{{ zm_pkg }}/' - name: Configuring Zimbra OSE's services for use command: ./zmsetup.pl -c /tmp/zcs/installZimbraScript diff --git a/tasks/main.yml b/tasks/main.yml index 2def1c9..1c501f9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,8 +10,6 @@ # # 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' diff --git a/tasks/vars/8.8.15.yml b/tasks/vars/8.8.15.yml deleted file mode 100644 index 47aa8fc..0000000 --- a/tasks/vars/8.8.15.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -# -# Setting variables -################################################################################ -- name: Loading the address to the most recent release of Zimbra OSE (8.8.15) - set_fact: zmurl=https://files.zimbra.com/downloads/8.8.15_GA/ - -- name: Check if your distro is Ubuntu Server 16.04 LTS - set_fact: zmpkg=zcs-8.8.15_GA_3869.UBUNTU16_64.20190918004220 - when: ansible_distribution_major_version|int >= 16 and ansible_distribution_major_version|int <= 17 - -- name: Check if your distro is Ubuntu Server 18.04 LTS - set_fact: zmpkg=zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220 - when: ansible_distribution_major_version|int >= 18 and ansible_distribution_major_version|int <= 19 - -- name: Check if your distro is Ubuntu Server 20.04 LTS - set_fact: zmpkg=zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954 - when: ansible_distribution_major_version|int >= 20 - -- name: Check if your distro is Ubuntu Server 14.04 LTS - set_fact: zmpkg=zcs-8.8.15_GA_3869.UBUNTU14_64.20190918004220 - 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.15_GA_3869.RHEL6_64.20190918004220 - 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.15_GA_3869.RHEL7_64.20190918004220 - when: ansible_distribution_major_version == "7" - -- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 8) - set_fact: zmpkg=zcs-8.8.15_GA_3953.RHEL8_64.20200629025823 - when: ansible_distribution_major_version == "8" diff --git a/templates/installZimbra-keystrokes b/templates/installZimbra-keystrokes index 34a7e04..1a5d627 100644 --- a/templates/installZimbra-keystrokes +++ b/templates/installZimbra-keystrokes @@ -10,7 +10,9 @@ y {{ zimbra_spell }} {{ zimbra_memcached }} {{ zimbra_proxy }} +{% if zimbra_version == '8.8.15' %} {{ zimbra_chat }} {{ zimbra_drive }} {{ zimbra_imapd }} +{% endif %} y