mirror of https://github.com/lucascbeyeler/zimbra
Compare commits
No commits in common. "master" and "8.7.11-3" have entirely different histories.
|
|
@ -1,3 +0,0 @@
|
||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
github: [lucascbeyeler]
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
OLD
|
OLD
|
||||||
.idea
|
|
||||||
20
README.md
20
README.md
|
|
@ -1,22 +1,22 @@
|
||||||
Zimbra
|
Zimbra
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Non-Official ansible role to install and configure Zimbra Collaboration Open Source Edition on Red Hat, CentOS and Ubuntu Server.
|
Ansible role to install and configure Zimbra Collaboration Open Source Edition
|
||||||
|
|
||||||
[](https://travis-ci.org/lucascbeyeler/zimbra)
|
[](https://travis-ci.org/lucascbeyeler/zimbra)
|
||||||
[](https://www.zimbra.com/downloads/zimbra-collaboration-open-source/)
|
[](https://www.zimbra.com/downloads/zimbra-collaboration-open-source/)
|
||||||

|

|
||||||

|

|
||||||
[](https://www.ansible.com/)
|
[](https://www.ansible.com/)
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* [Ansible](https://github.com/ansible/ansible) 2.9.6 or high.
|
* [Ansible](https://github.com/ansible/ansible) 2.3.1.0 or superior.
|
||||||
|
|
||||||
Install
|
Install
|
||||||
--------------
|
--------------
|
||||||
Zimbra is already in Ansible Galaxy, so the only thing you need to install this script in your machine is just use ansible-galaxy command:
|
ansible-zimbra is already in Ansible Galaxy, so the only thing you need to install this script in your machine is just use ansible-galaxy command:
|
||||||
|
|
||||||
```
|
```
|
||||||
ansible-galaxy install lucascbeyeler.zimbra
|
ansible-galaxy install lucascbeyeler.zimbra
|
||||||
|
|
@ -53,7 +53,6 @@ Role Variables
|
||||||
* **zmlogologin:** Inform the path for your logo (Login Screen) - don't inform and no image will be applied;
|
* **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;
|
* **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;
|
* **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
|
|
||||||
|
|
||||||
Service Variables - Inform "y" or "n"
|
Service Variables - Inform "y" or "n"
|
||||||
--------------
|
--------------
|
||||||
|
|
@ -68,9 +67,8 @@ Service Variables - Inform "y" or "n"
|
||||||
* **zimbra_spell:** Enable Zimbra Spell Check - default: **y**
|
* **zimbra_spell:** Enable Zimbra Spell Check - default: **y**
|
||||||
* **zimbra_memcached:** Enable Zimbra Cache Service (Memcached) - default: **y**
|
* **zimbra_memcached:** Enable Zimbra Cache Service (Memcached) - default: **y**
|
||||||
* **zimbra_proxy:** Enable Zimbra Proxy Service - default: **y**
|
* **zimbra_proxy:** Enable Zimbra Proxy Service - default: **y**
|
||||||
* **zimbra_chat:** Enable Zimbra Chat - default: **n**
|
* **zimbra_chat:** Enable Zimbra Chat **BETA** - default: **n**
|
||||||
* **zimbra_drive:** Enable Zimbra ownCloud Drive - default: **n**
|
* **zimbra_drive:** Enable Zimbra ownCloud Drive **BETA** - default: **n**
|
||||||
* **zimbra_imapd:** Enable Zimbra IMAPD Solo Service **BETA** - default: **n**
|
|
||||||
* **zimbra_policyd:** Enable Zimbra PolicyD Service - default: **n**
|
* **zimbra_policyd:** Enable Zimbra PolicyD Service - default: **n**
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
|
|
@ -86,8 +84,8 @@ Example Playbook
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
roles:
|
roles:
|
||||||
- role: lucascbeyeler.zimbra
|
- role: lucascbeyeler.zimbra
|
||||||
hostname: localhost
|
hostname: warudo
|
||||||
domain: localdomain
|
domain: hollowbastion.com
|
||||||
timezone: America/Sao_Paulo
|
timezone: America/Sao_Paulo
|
||||||
zmpasswd: 123change
|
zmpasswd: 123change
|
||||||
zmnetwork: 192.168.122.0/24
|
zmnetwork: 192.168.122.0/24
|
||||||
|
|
|
||||||
|
|
@ -9,39 +9,3 @@ ubuntu:
|
||||||
centos:
|
centos:
|
||||||
- pyzor
|
- pyzor
|
||||||
- perl-Razor-Agent
|
- perl-Razor-Agent
|
||||||
|
|
||||||
#
|
|
||||||
# Products to be installed
|
|
||||||
################################################################################
|
|
||||||
zimbra_ldap: y
|
|
||||||
zimbra_logger: y
|
|
||||||
zimbra_mta: y
|
|
||||||
zimbra_dnscache: n
|
|
||||||
zimbra_snmp: n
|
|
||||||
zimbra_store: y
|
|
||||||
zimbra_apache: y
|
|
||||||
zimbra_spell: y
|
|
||||||
zimbra_memcached: y
|
|
||||||
zimbra_proxy: y
|
|
||||||
zimbra_chat: n
|
|
||||||
zimbra_drive: n
|
|
||||||
zimbra_imapd: n
|
|
||||||
zimbra_policyd: n
|
|
||||||
|
|
||||||
#
|
|
||||||
# Zimbra configuration
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
hostname: "localhost"
|
|
||||||
domain: "localdomain"
|
|
||||||
zmpasswd: "!23Change"
|
|
||||||
zmnetwork: "192.168.200.0/8"
|
|
||||||
timezone: UTC
|
|
||||||
#hosts_lines:
|
|
||||||
# - "198.162.1.3 {{ hostname }}.{{ domain }} {{ hostname }}"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Zimbra configuration
|
|
||||||
################################################################################
|
|
||||||
zimbra_version: 8.8.15
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,19 @@ galaxy_info:
|
||||||
description: Ansible role to install and configure Zimbra Collaboration Open Source Edition
|
description: Ansible role to install and configure Zimbra Collaboration Open Source Edition
|
||||||
company: Beyeler
|
company: Beyeler
|
||||||
license: GPLv3
|
license: GPLv3
|
||||||
min_ansible_version: 2.9.6
|
min_ansible_version: 2.3
|
||||||
github_branch: master
|
github_branch: master
|
||||||
platforms:
|
platforms:
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- trusty
|
- trusty
|
||||||
- xenial
|
- xenial
|
||||||
- bionic
|
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 6
|
- 6
|
||||||
- 7
|
- 7
|
||||||
- 8
|
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- zimbra
|
- zimbra
|
||||||
- community
|
- community
|
||||||
|
dependencies:
|
||||||
|
- { role: lucascbeyeler.baseline }
|
||||||
|
|
|
||||||
|
|
@ -19,23 +19,17 @@
|
||||||
mode: 0440
|
mode: 0440
|
||||||
|
|
||||||
- name: Enabling SpamAssassin Auto Update
|
- name: Enabling SpamAssassin Auto Update
|
||||||
command: ./zmlocalconfig -e antispam_enable_rule_updates=true
|
command: zmlocalconfig -e antispam_enable_rule_updates=true
|
||||||
args:
|
|
||||||
chdir: /opt/zimbra/bin/
|
|
||||||
become: true
|
become: true
|
||||||
become_user: zimbra
|
become_user: zimbra
|
||||||
|
|
||||||
- name: Enabling Amavis to restart when the rules are update
|
- name: Enabling Amavis to restart when the rules are update
|
||||||
command: ./zmlocalconfig -e antispam_enable_restarts=true
|
command: zmlocalconfig -e antispam_enable_restarts=true
|
||||||
args:
|
|
||||||
chdir: /opt/zimbra/bin/
|
|
||||||
become: true
|
become: true
|
||||||
become_user: zimbra
|
become_user: zimbra
|
||||||
|
|
||||||
- name: Enabling SpamAssassin rule compilation
|
- name: Enabling SpamAssassin rule compilation
|
||||||
command: ./zmlocalconfig -e antispam_enable_rule_compilation=true
|
command: zmlocalconfig -e antispam_enable_rule_compilation=true
|
||||||
args:
|
|
||||||
chdir: /opt/zimbra/bin/
|
|
||||||
become: true
|
become: true
|
||||||
become_user: zimbra
|
become_user: zimbra
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
#
|
||||||
|
# Setting variables
|
||||||
|
################################################################################
|
||||||
|
- name: Loading the address to the most recent release of Zimbra OSE (8.7.11)
|
||||||
|
set_fact: zmurl=https://files.zimbra.com/downloads/8.7.11_GA/
|
||||||
|
|
||||||
|
- name: Check if your distro is Ubuntu Server 16.04 LTS
|
||||||
|
set_fact: zmpkg=zcs-8.7.11_GA_1854.UBUNTU16_64.20170531151956
|
||||||
|
when: ansible_distribution_major_version|int >= 16
|
||||||
|
|
||||||
|
- name: Check if your distro is Ubuntu Server 14.04 LTS
|
||||||
|
set_fact: zmpkg=zcs-8.7.11_GA_1854.UBUNTU14_64.20170531151956
|
||||||
|
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.7.11_GA_1854.RHEL6_64.20170531151956
|
||||||
|
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.7.11_GA_1854.RHEL7_64.20170531151956
|
||||||
|
when: ansible_distribution_major_version == "7"
|
||||||
|
|
@ -2,15 +2,6 @@
|
||||||
#
|
#
|
||||||
# Download and install Zimbra OSE
|
# Download and install Zimbra OSE
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
- name: Update /etc/hosts
|
|
||||||
lineinfile:
|
|
||||||
path: /etc/hosts
|
|
||||||
line: "{{ item }}"
|
|
||||||
state: present
|
|
||||||
with_items: "{{ hosts_lines }}"
|
|
||||||
when: hosts_lines is defined
|
|
||||||
|
|
||||||
- name: Download and unpacking Zimbra OSE
|
- name: Download and unpacking Zimbra OSE
|
||||||
unarchive:
|
unarchive:
|
||||||
validate_certs: no
|
validate_certs: no
|
||||||
|
|
|
||||||
|
|
@ -10,39 +10,38 @@
|
||||||
#
|
#
|
||||||
# Installation process
|
# Installation process
|
||||||
################################################################################
|
################################################################################
|
||||||
- import_tasks: 'vars/{{zimbra_version}}.yml'
|
- include: 'install/vars.yml'
|
||||||
when: getent_passwd.rc == 2
|
when: getent_passwd.rc == 2
|
||||||
- import_tasks: 'install/dependencies.yml'
|
- include: 'install/dependencies.yml'
|
||||||
when: getent_passwd.rc == 2
|
when: getent_passwd.rc == 2
|
||||||
- import_tasks: 'install/zimbra.yml'
|
- include: 'install/zimbra.yml'
|
||||||
when: getent_passwd.rc == 2
|
when: getent_passwd.rc == 2
|
||||||
- import_tasks: 'install/policyd.yml'
|
- include: 'install/policyd.yml'
|
||||||
when: zimbra_policyd == 'y'
|
when: zimbra_policyd == 'y'
|
||||||
|
|
||||||
#
|
#
|
||||||
# Configuration process
|
# Configuration process
|
||||||
################################################################################
|
################################################################################
|
||||||
- import_tasks: 'configure/proxy.yml'
|
- include: 'configure/proxy.yml'
|
||||||
when: zimbra_proxy == 'y'
|
when: zimbra_proxy == 'y'
|
||||||
- import_tasks: 'configure/mailbox.yml'
|
- include: 'configure/mailbox.yml'
|
||||||
when: zimbra_store == 'y'
|
when: zimbra_store == 'y'
|
||||||
- import_tasks: 'configure/mta.yml'
|
- include: 'configure/mta.yml'
|
||||||
when: zimbra_mta == 'y'
|
when: zimbra_mta == 'y'
|
||||||
|
|
||||||
#
|
#
|
||||||
# Extras configuration process
|
# Extras configuration process
|
||||||
################################################################################
|
################################################################################
|
||||||
- import_tasks: 'extras/modify-logo.yml'
|
- include: 'extras/modify-logo.yml'
|
||||||
when: zmlogologin is defined and zmlogoapp is defined
|
when: zmlogologin is defined and zmlogoapp is defined
|
||||||
|
|
||||||
#
|
#
|
||||||
# Restarting Zimbra
|
# Restarting Zimbra
|
||||||
################################################################################
|
################################################################################
|
||||||
- name: 'Reloading Zimbra OSE Services'
|
- name: 'Reloading Zimbra OSE Services'
|
||||||
shell: source /opt/zimbra/.bashrc && ./zmcontrol restart
|
command: ./zmcontrol restart
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
|
||||||
chdir: '/opt/zimbra/bin/'
|
chdir: '/opt/zimbra/bin/'
|
||||||
become: yes
|
become: yes
|
||||||
become_user: zimbra
|
become_user: zimbra
|
||||||
retries: 3
|
ignore_errors: true
|
||||||
|
|
|
||||||
|
|
@ -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"
|
|
||||||
|
|
@ -12,5 +12,4 @@ y
|
||||||
{{ zimbra_proxy }}
|
{{ zimbra_proxy }}
|
||||||
{{ zimbra_chat }}
|
{{ zimbra_chat }}
|
||||||
{{ zimbra_drive }}
|
{{ zimbra_drive }}
|
||||||
{{ zimbra_imapd }}
|
|
||||||
y
|
y
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ mailboxd_directory="/opt/zimbra/mailboxd"
|
||||||
mailboxd_keystore="/opt/zimbra/mailboxd/etc/keystore"
|
mailboxd_keystore="/opt/zimbra/mailboxd/etc/keystore"
|
||||||
mailboxd_keystore_password="{{ zmpasswd }}"
|
mailboxd_keystore_password="{{ zmpasswd }}"
|
||||||
mailboxd_server="jetty"
|
mailboxd_server="jetty"
|
||||||
mailboxd_truststore="/opt/zimbra/common/etc/java/cacerts"
|
mailboxd_truststore="/opt/zimbra/common/lib/jvm/java/jre/lib/security/cacerts"
|
||||||
mailboxd_truststore_password="changeit"
|
mailboxd_truststore_password="changeit"
|
||||||
postfix_mail_owner="postfix"
|
postfix_mail_owner="postfix"
|
||||||
postfix_setgid_group="postdrop"
|
postfix_setgid_group="postdrop"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
#
|
||||||
|
# Products to be installed
|
||||||
|
################################################################################
|
||||||
|
zimbra_ldap: y
|
||||||
|
zimbra_logger: y
|
||||||
|
zimbra_mta: y
|
||||||
|
zimbra_dnscache: n
|
||||||
|
zimbra_snmp: n
|
||||||
|
zimbra_store: y
|
||||||
|
zimbra_apache: y
|
||||||
|
zimbra_spell: y
|
||||||
|
zimbra_memcached: y
|
||||||
|
zimbra_proxy: y
|
||||||
|
zimbra_chat: n
|
||||||
|
zimbra_drive: n
|
||||||
|
zimbra_policyd: n
|
||||||
|
|
||||||
|
#
|
||||||
|
# Zimbra configuration
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
hostname: "localhost"
|
||||||
|
domain: "localdomain"
|
||||||
|
zmpasswd: "!23Change"
|
||||||
|
zmnetwork: "192.168.200.0/8"
|
||||||
|
timezone: UTC
|
||||||
Loading…
Reference in New Issue