Resolving issue #2, updating documentation, and made the reboot task work again

This commit is contained in:
lucascbeyeler 2017-02-18 11:32:52 -02:00
parent f264d3b728
commit a3d7e7514b
6 changed files with 45 additions and 27 deletions

View File

@ -20,6 +20,33 @@ stdout_callback=skippy
pipelining=True pipelining=True
``` ```
Install
--------------
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.ansible-zimbra
```
Update
--------------
When a new version of ansible-zimbra is released, you will need to run the install process again, but with the "-f" or "--force" parameter.
```
ansible-galaxy install -f lucascbeyeler.ansible-zimbra
```
Features
--------------
* Configuring SpamAssassin, Pyzor and Razor;
* Configure a logo for your server - **WARNING**: [Read this article for more details about the logo](https://blog.zimbra.com/2015/09/change-login-app-logo-open-source-network-edition/);
* Enable PolicyD service and web admin;
* Proxy Admin;
* HTTP to HTTPS redirect;
* LMTP Host Lookup in Native mode;
Role Variables Role Variables
-------------- --------------
@ -33,8 +60,7 @@ Role Variables
Dependencies Dependencies
------------ ------------
It's a good idea to apply the role lucascbeyeler.commons before run this playbook, because we do not cover any kind of server preparation, like updates. To run this playbook, you will need to run [lucascbeyeler.commons](https://github.com/lucascbeyeler/ansible-commons) too. We do not cover any kind of server preparation, like upgrade the system or change the hostname (even put the hostname in /etc/hosts is made by commons). The motive is because all my playbooks will need some kind of preparation before executed, so to not including the same code in every single project, I made a different playbook that will do everything that is considered "common" in each one of my playbooks.
Example Playbook Example Playbook
---------------- ----------------

View File

@ -1,8 +1,2 @@
--- ---
# handlers file for zimbra # handlers file for zimbra
- name: reboot-machine
shell: sleep 2 && shutdown -r now "Ansible updates triggered"
async: 1
poll: 0
ignore_errors: true

View File

@ -15,4 +15,12 @@
- include: nodistro/modify-logo.yml - include: nodistro/modify-logo.yml
when: zmlogologin is defined and zmlogoapp is defined when: zmlogologin is defined and zmlogoapp is defined
- include: nodistro/policyd.yml - include: nodistro/policyd.yml
notify: reboot-machine
#
# Rebooting the Machine
###################################
- name: Rebooting the machine to apply the changes
shell: sleep 2 && shutdown -r now "Ansible updates triggered"
async: 1
poll: 0
ignore_errors: true

View File

@ -1,8 +1,3 @@
# 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 # 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. # 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 # PLEASE - If you made a change here, remember to do in a way that every distro

View File

@ -1,14 +1,9 @@
# FILE: install-zimbra
# AUTHOR: Lucas Costa Beyeler
# E-MAIL: lucas.costab@outlook.com
# LAST CHANGE: 15/02/2017
#
# Playbook file to install and activate the PolicyD service in the Open Source Edition. # Playbook file to install and activate the PolicyD service in the Open Source Edition.
# PLEASE - If you made a change here, remember to do in a way that every 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. # can use this change. Otherwise, please use the folder RedHat/Debian.
- name: Installing and Enabling the PolicyD Service - name: Installing and Enabling the PolicyD Service
shell: ./zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd shell: ./zmprov ms {{ hostname }}.{{ domain }} +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd
args: args:
chdir: /opt/zimbra/bin/ chdir: /opt/zimbra/bin/
@ -25,3 +20,10 @@
src: /opt/zimbra/common/share/webui src: /opt/zimbra/common/share/webui
dest: /opt/zimbra/data/httpd/htdocs/webui dest: /opt/zimbra/data/httpd/htdocs/webui
state: link state: link
- name: Enable PolicyD Web Interface
lineinfile:
dest: /opt/zimbra/conf/httpd.conf
regexp: "^ DirectoryIndex index.html index.html.var"
line: " DirectoryIndex index.html index.html.var index.php"
state: present

View File

@ -1,7 +0,0 @@
---
# vars file for zimbra
hostname: localhost
domain: localdomain
zmpasswd: 123change
zmnetwork: 0.0.0.0/8