From 3e06f6b2ad1d69272cd26f5ae3ffb20a4722735b Mon Sep 17 00:00:00 2001 From: Lucas Costa Beyeler Date: Sat, 28 Jan 2017 22:28:52 -0200 Subject: [PATCH] Initial Commit --- .travis.yml | 29 +++ README.md | 40 ++++- defaults/main.yml | 2 + files/installZimbra-keystrokes | 14 ++ files/sauser.cf | 63 +++++++ handlers/main.yml | 8 + meta/main.yml | 223 ++++++++++++++++++++++++ tasks/Debian/packages.yml | 8 + tasks/RedHat/packages.yml | 8 + tasks/main.yml | 18 ++ tasks/nodistro/install-spamassassin.yml | 94 ++++++++++ tasks/nodistro/install-zimbra.yml | 64 +++++++ tasks/nodistro/modify-logo.yml | 42 +++++ tasks/vars/zimbra-Debian.yml | 13 ++ tasks/vars/zimbra-RedHat.yml | 13 ++ templates/installZimbraScript.j2 | 95 ++++++++++ tests/inventory | 1 + tests/test.yml | 5 + vars/Debian/packages.yml | 20 +++ vars/RedHat/packages.yml | 17 ++ vars/main.yml | 2 + 21 files changed, 777 insertions(+), 2 deletions(-) create mode 100644 .travis.yml create mode 100644 defaults/main.yml create mode 100644 files/installZimbra-keystrokes create mode 100644 files/sauser.cf create mode 100644 handlers/main.yml create mode 100644 meta/main.yml create mode 100644 tasks/Debian/packages.yml create mode 100644 tasks/RedHat/packages.yml create mode 100644 tasks/main.yml create mode 100644 tasks/nodistro/install-spamassassin.yml create mode 100644 tasks/nodistro/install-zimbra.yml create mode 100644 tasks/nodistro/modify-logo.yml create mode 100644 tasks/vars/zimbra-Debian.yml create mode 100644 tasks/vars/zimbra-RedHat.yml create mode 100644 templates/installZimbraScript.j2 create mode 100644 tests/inventory create mode 100644 tests/test.yml create mode 100644 vars/Debian/packages.yml create mode 100644 vars/RedHat/packages.yml create mode 100644 vars/main.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/README.md b/README.md index 4f08177..225dd44 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,38 @@ -# ansible-zimbra -Ansible role to install and configure Zimbra Collaboration Open Source Edition +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..9f472cd --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for zimbra diff --git a/files/installZimbra-keystrokes b/files/installZimbra-keystrokes new file mode 100644 index 0000000..37c9f53 --- /dev/null +++ b/files/installZimbra-keystrokes @@ -0,0 +1,14 @@ +y +y +y +y +y +y +y +y +y +y +y +y +y +y diff --git a/files/sauser.cf b/files/sauser.cf new file mode 100644 index 0000000..58aafcc --- /dev/null +++ b/files/sauser.cf @@ -0,0 +1,63 @@ +# Pyzor's Config - Change only if you know what are you doing +use_pyzor 1 +pyzor_path /usr/bin/pyzor +pyzor_timeout 20 + +# Razor's Config - Change only if you know what are you doing +use_razor2 1 + +#SpamAssassin's Scores - Change THIS file and not salocal.cf + +score ALL_TRUSTED -4.000 +score DATE_IN_PAST_12_24 2.000 +score DCC_CHECK 2.500 +score DNS_FROM_AHBL_RHSBL 0 +score FORGED_OUTLOOK_HTML 1.500 +score HEADER_FROM_DIFFERENT_DOMAINS 2.000 +score HTML_FONT_LOW_CONTRAST 2.000 +score HTML_IMAGE_RATIO_02 2.000 +score HTML_IMAGE_RATIO_04 1.700 +score HTML_IMAGE_RATIO_06 1.400 +score HTML_IMAGE_RATIO_08 0.500 +score HTML_MESSAGE 0.400 +score HTML_MIME_NO_HTML_TAG 1.000 +score MIME_HTML_ONLY 2.000 +score PYZOR_CHECK 3.250 +score RAZOR2_CHECK 3.250 +score RCVD_IN_BRBL_LASTEXT 3.500 +score RCVD_IN_PBL 0.905 +score RCVD_IN_RP_CERTIFIED -2.500 +score RCVD_IN_RP_SAFE -1.500 +score RDNS_NONE 0.000 +score REMOTE_IMAGE 2.500 +score SPAMCOP_BL 3.500 +score SPF_FAIL 10.000 +score SPF_HELO_FAIL 10.000 +score SPF_PASS -0.900 +score SUBJ_ALL_CAPS 2.000 +score SUBJ_ILLEGAL_CHARS 2.500 +score T_AXB_XM_SENTBY 2.000 +score T_FSL_HELO_NON_FQDN_2 0.800 +score T_HEADER_FROM_DIFFERENT_DOMAINS 2.000 +score T_HTML_ATTACH 1.000 +score T_HTML_ATTACH 2.000 +score T_LONG_HEADER_LINE_80 0.500 +score T_NOT_A_PERSON 0.500 +score T_OBFU_HTML_ATTACH 1.000 +score T_REMOTE_IMAGE 2.500 +score UPPERCASE_50_75 0.700 +score URIBL_BLACK 4.250 +score URIBL_DBL_REDIR 1.500 +score URIBL_DBL_SPAM 5.000 +score URIBL_JP_SURB 5.000 +score URIBL_JP_SURBL 5.000 +score URIBL_WS_SURBL 5.000 +score SUBJ_ALL_CAPS 1.000 +score LOTS_OF_MONEY 0.700 +score T_HK_MUCHMONEY 0.700 +score T_KHOP_FOREIGN_CLICK 0.700 +score T_SHORTENED_URL_HREF 0.400 +score T_URL_SHORTENER 0.400 +score BAD_ENC_HEADER 0.400 +score T_UNKNOWN_ORIGIN 0.700 +score RP_MATCHES_RCVD -0.000 diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..0ae8e49 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,8 @@ +--- +# handlers file for zimbra + +- name: reboot-machine + shell: sleep 2 && shutdown -r now "Ansible updates triggered" + async: 1 + poll: 0 + ignore_errors: true diff --git a/meta/main.yml b/meta/main.yml new file mode 100644 index 0000000..b5ce259 --- /dev/null +++ b/meta/main.yml @@ -0,0 +1,223 @@ +galaxy_info: + author: your name + description: your description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + + min_ansible_version: 1.2 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # Optionally specify the branch Galaxy will use when accessing the GitHub + # repo for this role. During role install, if no tags are available, + # Galaxy will use this branch. During import Galaxy will access files on + # this branch. If Travis integration is configured, only notifications for this + # branch will be accepted. Otherwise, in all cases, the repo's default branch + # (usually master) will be used. + #github_branch: + + # + # Below are all platforms currently available. Just uncomment the ones that apply + # to your role. If you don't see your platform on this list, let us know, + # and we'll get it added! + # + #platforms: + #- name: OpenBSD + # versions: + # - all + # - 5.6 + # - 5.7 + # - 5.8 + # - 5.9 + # - 6.0 + #- name: Fedora + # versions: + # - all + # - 16 + # - 17 + # - 18 + # - 19 + # - 20 + # - 21 + # - 22 + # - 23 + # - 24 + # - 25 + #- name: DellOS + # versions: + # - all + # - 10 + # - 6 + # - 9 + #- name: MacOSX + # versions: + # - all + # - 10.10 + # - 10.11 + # - 10.12 + # - 10.7 + # - 10.8 + # - 10.9 + #- name: Synology + # versions: + # - all + # - any + #- name: Junos + # versions: + # - all + # - any + #- name: GenericBSD + # versions: + # - all + # - any + #- name: Void Linux + # versions: + # - all + # - any + #- name: GenericLinux + # versions: + # - all + # - any + #- name: NXOS + # versions: + # - all + # - any + #- name: IOS + # versions: + # - all + # - any + #- name: Amazon + # versions: + # - all + # - 2013.03 + # - 2013.09 + # - 2016.03 + # - 2016.09 + #- name: ArchLinux + # versions: + # - all + # - any + #- name: FreeBSD + # versions: + # - all + # - 10.0 + # - 10.1 + # - 10.2 + # - 10.3 + # - 11.0 + # - 8.0 + # - 8.1 + # - 8.2 + # - 8.3 + # - 8.4 + # - 9.0 + # - 9.1 + # - 9.1 + # - 9.2 + # - 9.3 + #- name: Ubuntu + # versions: + # - all + # - lucid + # - maverick + # - natty + # - oneiric + # - precise + # - quantal + # - raring + # - saucy + # - trusty + # - utopic + # - vivid + # - wily + # - xenial + # - yakkety + #- name: Debian + # versions: + # - all + # - etch + # - jessie + # - lenny + # - sid + # - squeeze + # - stretch + # - wheezy + #- name: Alpine + # versions: + # - all + # - any + #- name: EL + # versions: + # - all + # - 5 + # - 6 + # - 7 + #- name: Windows + # versions: + # - all + # - 2012R2 + #- name: SmartOS + # versions: + # - all + # - any + #- name: opensuse + # versions: + # - all + # - 12.1 + # - 12.2 + # - 12.3 + # - 13.1 + # - 13.2 + #- name: SLES + # versions: + # - all + # - 10SP3 + # - 10SP4 + # - 11 + # - 11SP1 + # - 11SP2 + # - 11SP3 + # - 11SP4 + # - 12 + # - 12SP1 + #- name: GenericUNIX + # versions: + # - all + # - any + #- name: Solaris + # versions: + # - all + # - 10 + # - 11.0 + # - 11.1 + # - 11.2 + # - 11.3 + #- name: eos + # versions: + # - all + # - Any + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. \ No newline at end of file diff --git a/tasks/Debian/packages.yml b/tasks/Debian/packages.yml new file mode 100644 index 0000000..8fba89d --- /dev/null +++ b/tasks/Debian/packages.yml @@ -0,0 +1,8 @@ +# Here we will download some packages that are needed to be present during the +# Zimbra install + +- name: Download all the Zimbra's dependency for CentOS/RHEL System + apt: pkg='{{ dependency }}' state=installed + +- name: Ensure Postfix/dnsmasq not installed + apt: pkg='{{ absent }}' state=absent diff --git a/tasks/RedHat/packages.yml b/tasks/RedHat/packages.yml new file mode 100644 index 0000000..d1154ea --- /dev/null +++ b/tasks/RedHat/packages.yml @@ -0,0 +1,8 @@ +# Here we will download some packages that are needed to be present during the +# Zimbra install + +- name: Download all the Zimbra's dependency for CentOS/RHEL System + yum: pkg='{{ dependency }}' state=installed + +- name: Ensure Postfix not installed + yum: pkg='{{ absent }}' state=absent diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..f4e991d --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,18 @@ +--- +# tasks file for zimbra + +# +# Loading variables +################################### +- include_vars: file='{{ ansible_os_family }}/packages.yml' +- include: 'vars/zimbra-{{ ansible_os_family }}.yml' + +# +# Starting the install +################################### +- include: '{{ ansible_os_family }}/packages.yml' +- include: nodistro/install-zimbra.yml +- include: nodistro/install-spamassassin.yml +- include: nodistro/modify-logo.yml + when: zmlogologin is defined and zmlogoapp is defined + notify: reboot-machine diff --git a/tasks/nodistro/install-spamassassin.yml b/tasks/nodistro/install-spamassassin.yml new file mode 100644 index 0000000..3b804ba --- /dev/null +++ b/tasks/nodistro/install-spamassassin.yml @@ -0,0 +1,94 @@ +# Here we will download and install the Zimbra Server for first use. This +# playbook was made in a way to be used the same code for ever distro. +# PLEASE - If you made a change here, remember to do in a way that every distro +# can use this change. Otherwise, please use the folder RedHat/Debian. + +# +# Downloading packages +################################### +- name: Downloading and Installing Kevin McGrail's Custom Rules + get_url: + url: https://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf + dest: /opt/zimbra/data/spamassassin/localrules/sakam.cf + mode: 0440 + owner: zimbra + group: zimbra + +- name: Downloading and Configuring Pyzor's Anti-spam Base + shell: pyzor --homedir /opt/zimbra/data/amavisd/.pyzor discover + become: true + become_user: zimbra + +- name: Creating Razor's Anti-spam Base + shell: razor-admin -home=/opt/zimbra/data/amavisd/.razor -create + become: true + become_user: zimbra + +- name: Downloading Razor's Anti-spam Base + shell: razor-admin -home=/opt/zimbra/data/amavisd/.razor -discover + become: true + become_user: zimbra + +# +# Registering Razor Install +################################### +- name: Registering your Razor installation - User definitions + shell: 'razor-admin -home=/opt/zimbra/data/amavisd/.razor -register -user {{ rzuser }} -pass {{ rzpass }}' + become: true + become_user: zimbra + when: rzuser is defined and rzpass is not defined + +- name: Registering your Razor installation - DEFAULT + shell: 'razor-admin -home=/opt/zimbra/data/amavisd/.razor -register' + become: true + become_user: zimbra + when: rzuser is not defined and rzpass is not defined + +# +# Configuring the Spamassassin +################################### +- name: Configuring sauser.cf With new Scores + copy: + src: sauser.cf + dest: /opt/zimbra/data/spamassassin/localrules/sauser.cf + owner: root + group: root + mode: 0440 + +# +# Installing the RBL's +################################### +- name: Importing zen.spamhaus.org RBL + shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client zen.spamhaus.org' + args: + chdir: /opt/zimbra/bin/ + become: true + become_user: zimbra + +- name: Importing sbl.spamhaus.org RBL + shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client sbl.spamhaus.org' + args: + chdir: /opt/zimbra/bin/ + become: true + become_user: zimbra + +- name: Importing dsn.rfc-ignorant.org RBL + shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client dsn.rfc-ignorant.org' + args: + chdir: /opt/zimbra/bin/ + become: true + become_user: zimbra + +- name: Importing bl.spamcop.net RBL + shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client bl.spamcop.net' + args: + chdir: /opt/zimbra/bin/ + become: true + become_user: zimbra + +- name: Importing dnsbl.sorbs.net RBL + shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client dnsbl.sorbs.net' + args: + chdir: /opt/zimbra/bin/ + become: true + become_user: zimbra diff --git a/tasks/nodistro/install-zimbra.yml b/tasks/nodistro/install-zimbra.yml new file mode 100644 index 0000000..c396ecf --- /dev/null +++ b/tasks/nodistro/install-zimbra.yml @@ -0,0 +1,64 @@ +# FILE: install-zimbra +# AUTHOR: Lucas Costa Beyeler +# E-MAIL: lucas.costab@outlook.com +# LAST CHANGE: 09/03/2016 +# +# Here we will download and install the Zimbra Server for first use. This +# playbook was made in a way to be used the same code for ever distro. +# PLEASE - If you made a change here, remember to do in a way that every distro +# can use this change. Otherwise, please use the folder RedHat/Debian. + +- name: Download and Unpacking Zimbra Collaboration - Open Source Edition + unarchive: + validate_certs: no + src: '{{ zmurl }}{{ zmpkg }}.tgz' + dest: /usr/local/src/ + copy: no + +- name: Create the Folder Structure for the Installer (TEMP) + file: + path: /tmp/zcs + state: directory + +- name: Uploading Keystroke File (TEMP) + copy: + src: 'installZimbra-keystrokes' + dest: /tmp/zcs/installZimbra-keystrokes + owner: root + group: root + mode: 0644 + +- name: Uploading Installer Configuration File (TEMP) + template: + src: 'installZimbraScript.j2' + dest: /tmp/zcs/installZimbraScript + owner: root + group: root + mode: 0644 + +- name: Installing Zimbra Collaboration's Packages + shell: ./install.sh -s < /tmp/zcs/installZimbra-keystrokes + args: + chdir: '/usr/local/src/{{ zmpkg }}/' + +- name: Configuring the Server for First Use - This will take a while... + shell: ./zmsetup.pl -c /tmp/zcs/installZimbraScript + args: + chdir: /opt/zimbra/libexec/ + +- name: Setting LMTP Host Lookup from DNS to Native + shell: ./zmprov mcf zimbraMtaLmtpHostLookup native + args: + chdir: /opt/zimbra/bin/ + +- name: Setting Admin via Proxy Server + shell: ./zmproxyconfig -e -w -C -H {{ hostname }}.{{ domain }} + args: + chdir: /opt/zimbra/libexec/ + become: yes + become_user: zimbra + +- name: Redirecting HTTP to HTTPS + shell: ./zmprov ms {{ hostname }}.{{ domain }} zimbraReverseProxyMailMode redirect + args: + chdir: /opt/zimbra/bin/ diff --git a/tasks/nodistro/modify-logo.yml b/tasks/nodistro/modify-logo.yml new file mode 100644 index 0000000..0b40612 --- /dev/null +++ b/tasks/nodistro/modify-logo.yml @@ -0,0 +1,42 @@ +# Change the default logo inside the webmail and on the login screen +# This playbook is not required to run for a 100% install. To skip, just don't +# inform the vars zmlogologin and zmlogoapp. +# WARNING: It's required to use this playbook both files: The logo for the +# webmail and the logo for the login screen. + +- name: Send the logo file (LOGIN) from your PC to the Server + copy: + src: '{{ zmlogologin }}' + dest: /opt/zimbra/jetty/webapps/zimbra/img/logoLoginBanner.png + owner: zimbra + group: zimbra + mode: 0644 + +- name: Send the logo file (WEBMAIL) from your PC to the Server + copy: + src: '{{ zmlogoapp }}' + dest: /opt/zimbra/jetty/webapps/zimbra/img/logoAppBanner.png + owner: zimbra + group: zimbra + mode: 0644 + +- name: Configure the Zimbra Server to find the new logos + shell: './zmprov md {{ domain }} zimbraSkinLogoURL https://{{ hostname }}.{{ domain }}' + args: + chdir: /opt/zimbra/bin + become: true + become_user: zimbra + +- name: Configure the path for the login logo file + shell: './zmprov md {{ domain }} zimbraSkinLogoLoginBanner /img/logoLoginBanner.png' + args: + chdir: /opt/zimbra/bin + become: true + become_user: zimbra + +- name: Configure the path for the webmail logo file + shell: './zmprov md {{ domain }} zimbraSkinLogoAppBanner /img/logoAppBanner.png' + args: + chdir: /opt/zimbra/bin + become: true + become_user: zimbra diff --git a/tasks/vars/zimbra-Debian.yml b/tasks/vars/zimbra-Debian.yml new file mode 100644 index 0000000..698d7dc --- /dev/null +++ b/tasks/vars/zimbra-Debian.yml @@ -0,0 +1,13 @@ +# This is where the Ansible will check which S.O. you are using and select the +# correct package to install + +- name: Set the Playbook to Install Zimbra Collaboration 8.7 - Open Source Edition + set_fact: zmurl=https://files.zimbra.com/downloads/8.7.1_GA/ + +- name: Check if your distro is Ubuntu Server 16.04 LTS + set_fact: zmpkg=zcs-8.7.1_GA_1670.UBUNTU16_64.20161025045114 + when: ansible_distribution_major_version|int >= 16 + +- name: Check if your distro is Ubuntu Server 14.04 LTS + set_fact: zmpkg=zcs-8.7.1_GA_1670.UBUNTU14_64.20161025045105 + when: ansible_distribution_major_version|int >= 14 and ansible_distribution_major_version|int <= 15 diff --git a/tasks/vars/zimbra-RedHat.yml b/tasks/vars/zimbra-RedHat.yml new file mode 100644 index 0000000..13a797f --- /dev/null +++ b/tasks/vars/zimbra-RedHat.yml @@ -0,0 +1,13 @@ +# This is where the Ansible will check which S.O. you are using and select the +# correct package to install + +- name: Set the Playbook to Install Zimbra Collaboration 8.7 - Open Source Edition + set_fact: zmurl=https://files.zimbra.com/downloads/8.7.1_GA/ + +- name: Check if your distro is Red Hat Enterprise Linux or CentOS (Major 6) + set_fact: zmpkg=zcs-8.7.1_GA_1670.RHEL6_64.20161025035141 + 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.1_GA_1670.RHEL7_64.20161025045328 + when: ansible_distribution_major_version == "7" diff --git a/templates/installZimbraScript.j2 b/templates/installZimbraScript.j2 new file mode 100644 index 0000000..46b7f8c --- /dev/null +++ b/templates/installZimbraScript.j2 @@ -0,0 +1,95 @@ +AVDOMAIN="{{ domain }}" +AVUSER="admin@{{ domain }}" +CREATEADMIN="admin@{{ domain }}" +CREATEADMINPASS="{{ zmpasswd }}" +CREATEDOMAIN="{{ domain }}" +DOCREATEADMIN="yes" +DOCREATEDOMAIN="yes" +DOTRAINSA="yes" +EXPANDMENU="no" +HOSTNAME="{{ hostname }}.{{ domain }}" +HTTPPORT="8080" +HTTPPROXY="TRUE" +HTTPPROXYPORT="80" +HTTPSPORT="8443" +HTTPSPROXYPORT="443" +IMAPPORT="7143" +IMAPPROXYPORT="143" +IMAPSSLPORT="7993" +IMAPSSLPROXYPORT="993" +INSTALL_WEBAPPS="service zimlet zimbra zimbraAdmin" +JAVAHOME="/opt/zimbra/common/lib/jvm/java" +LDAPAMAVISPASS="{{ zmpasswd }}" +LDAPPOSTPASS="{{ zmpasswd }}" +LDAPROOTPASS="{{ zmpasswd }}" +LDAPADMINPASS="{{ zmpasswd }}" +LDAPREPPASS="{{ zmpasswd }}" +LDAPBESSEARCHSET="set" +LDAPHOST="{{ hostname }}.{{ domain }}" +LDAPPORT="389" +LDAPREPLICATIONTYPE="master" +LDAPSERVERID="2" +MAILBOXDMEMORY="972" +MAILPROXY="TRUE" +MODE="https" +MYSQLMEMORYPERCENT="30" +POPPORT="7110" +POPPROXYPORT="110" +POPSSLPORT="7995" +POPSSLPROXYPORT="995" +PROXYMODE="https" +REMOVE="no" +RUNARCHIVING="no" +RUNAV="yes" +RUNCBPOLICYD="no" +RUNDKIM="yes" +RUNSA="yes" +RUNVMHA="no" +SERVICEWEBAPP="yes" +SMTPDEST="admin@{{ domain }}" +SMTPHOST="{{ hostname }}.{{ domain }}" +SMTPNOTIFY="yes" +SMTPSOURCE="admin@{{ domain }}" +SNMPNOTIFY="yes" +SNMPTRAPHOST="{{ hostname }}.{{ domain }}" +SPELLURL="http://{{ hostname }}.{{ domain }}:7780/aspell.php" +STARTSERVERS="yes" +SYSTEMMEMORY="3.8" +TRAINSAHAM="ham.mwbaf3ds2e@{{ domain }}" +TRAINSASPAM="spam.zp_x70awf@{{ domain }}" +UIWEBAPPS="yes" +UPGRADE="yes" +USESPELL="yes" +VERSIONUPDATECHECKS="TRUE" +VIRUSQUARANTINE="virus-quarantine.ojgno7nds@{{ domain }}" +ZIMBRA_REQ_SECURITY="yes" +ldap_bes_searcher_password="{{ zmpasswd }}" +ldap_dit_base_dn_config="cn=zimbra" +ldap_nginx_password="{{ zmpasswd }}" +mailboxd_directory="/opt/zimbra/mailboxd" +mailboxd_keystore="/opt/zimbra/mailboxd/etc/keystore" +mailboxd_keystore_password="{{ zmpasswd }}" +mailboxd_server="jetty" +mailboxd_truststore="/opt/zimbra/common/lib/jvm/java/jre/lib/security/cacerts" +mailboxd_truststore_password="changeit" +postfix_mail_owner="postfix" +postfix_setgid_group="postdrop" +ssl_default_digest="sha256" +zimbraFeatureBriefcasesEnabled="Enabled" +zimbraFeatureTasksEnabled="Enabled" +zimbraIPMode="ipv4" +zimbraMailProxy="TRUE" +zimbraMtaMyNetworks="127.0.0.0/8 [::1]/128 {{ zmnetwork }}" +zimbraPrefTimeZoneId="America/Sao_Paulo" +zimbraReverseProxyLookupTarget="TRUE" +zimbraVersionCheckNotificationEmail="admin@{{ domain }}" +zimbraVersionCheckNotificationEmailFrom="admin@{{ domain }}" +zimbraVersionCheckSendNotifications="TRUE" +zimbraWebProxy="TRUE" +zimbra_ldap_userdn="uid=zimbra,cn=admins,cn=zimbra" +zimbra_require_interprocess_security="1" +zimbraDNSMasterIP="8.8.8.8" +zimbraDNSTCPUpstream="no" +zimbraDNSUseTCP="yes" +zimbraDNSUseUDP="yes" +INSTALL_PACKAGES="zimbra-core zimbra-ldap zimbra-logger zimbra-mta zimbra-dnscache zimbra-snmp zimbra-store zimbra-apache zimbra-spell zimbra-memcached zimbra-proxy " diff --git a/tests/inventory b/tests/inventory new file mode 100644 index 0000000..d18580b --- /dev/null +++ b/tests/inventory @@ -0,0 +1 @@ +localhost \ No newline at end of file diff --git a/tests/test.yml b/tests/test.yml new file mode 100644 index 0000000..a4e27dc --- /dev/null +++ b/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - zimbra \ No newline at end of file diff --git a/vars/Debian/packages.yml b/vars/Debian/packages.yml new file mode 100644 index 0000000..ac1733f --- /dev/null +++ b/vars/Debian/packages.yml @@ -0,0 +1,20 @@ +# Here you can set the packages name installed by zimbra's role + +# Dependency is where you inform the packages Zimbra need to be installed before +# you run the installer + +dependency: + - libgmp10 + - libperl5.22 + - pax + - sqlite3 + - dnsmasq + - wget + - libaio1 + - razor + - pyzor + +absent: + - postfix + - sendmail + - dnsmasq diff --git a/vars/RedHat/packages.yml b/vars/RedHat/packages.yml new file mode 100644 index 0000000..af9e74a --- /dev/null +++ b/vars/RedHat/packages.yml @@ -0,0 +1,17 @@ +# Here you can set the packages name installed by zimbra's role + +# Dependency is where you inform the packages Zimbra need to be installed before +# you run the installer + +dependency: + - nmap-ncat + - perl-core + - gcc + - openssl-devel + - kernel-devel + - pyzor + - perl-Razor-Agent + +absent: + - postfix + - sendmail diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000..454cdb5 --- /dev/null +++ b/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for zimbra