From af2465d6184562f8972d67a13d0dc92e2bb0562c Mon Sep 17 00:00:00 2001 From: lucascbeyeler Date: Wed, 15 Feb 2017 11:41:24 -0200 Subject: [PATCH] Including PolicyD configuration as said in Issue #2 --- files/config.php | 25 +++++++++++++++++++++++++ tasks/main.yml | 5 +++-- tasks/nodistro/policyd.yml | 27 +++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 files/config.php create mode 100644 tasks/nodistro/policyd.yml diff --git a/files/config.php b/files/config.php new file mode 100644 index 0000000..19e7979 --- /dev/null +++ b/files/config.php @@ -0,0 +1,25 @@ + diff --git a/tasks/main.yml b/tasks/main.yml index f4e991d..c128a70 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,4 @@ ---- -# tasks file for zimbra +# This is the main file for the role. # # Loading variables @@ -15,4 +14,6 @@ - include: nodistro/install-spamassassin.yml - include: nodistro/modify-logo.yml when: zmlogologin is defined and zmlogoapp is defined +- include: nodistro/policyd.yml + when: zmlogologin is defined and zmlogoapp is defined notify: reboot-machine diff --git a/tasks/nodistro/policyd.yml b/tasks/nodistro/policyd.yml new file mode 100644 index 0000000..914b554 --- /dev/null +++ b/tasks/nodistro/policyd.yml @@ -0,0 +1,27 @@ +# 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. +# 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: Installing and Enabling the PolicyD Service + shell: ./zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd + args: + chdir: /opt/zimbra/bin/ + +- name: Configuring PolicyD Database + copy: + src: 'config.php' + dest: /opt/zimbra/common/share/webui/includes/config.php + owner: root + group: root + mode: 0644 + +- name: Configuring PolicyD Web Interface + file: + src: /opt/zimbra/common/share/webui + dest: /opt/zimbra/data/httpd/htdocs/webui + state: link