From ab5154ee83effe9abb3b7f37b55201cce4724058 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Thu, 10 Dec 2015 20:00:36 +0200
Subject: [PATCH] Depend on Apache role, remove unnecessary tasks and config.

---
 meta/main.yml                |  3 ++-
 tasks/phpldapadmin.yml       | 22 +---------------------
 templates/phpmyadmin.conf.j2 |  9 ---------
 3 files changed, 3 insertions(+), 31 deletions(-)

diff --git a/meta/main.yml b/meta/main.yml
index 90e3f62..0ac44d8 100644
--- a/meta/main.yml
+++ b/meta/main.yml
@@ -6,4 +6,5 @@ galaxy_info:
   license: license (GPLv2, CC-BY, etc)
   #platforms:
   #categories:
-dependencies: []
+dependencies:
+- apache
diff --git a/tasks/phpldapadmin.yml b/tasks/phpldapadmin.yml
index b2ed81b..a2d4c68 100644
--- a/tasks/phpldapadmin.yml
+++ b/tasks/phpldapadmin.yml
@@ -19,20 +19,6 @@
   when: phpldapadmin_debconf.changed
   command: /usr/sbin/dpkg-reconfigure --frontend noninteractive slapd
 
-- name: Enable mod-ssl in Apache
-  apache2_module:
-    name: ssl
-    state: present
-  notify:
-    - Restart Apache
-
-- name: Disable default Apache site
-  file:
-    path: /etc/apache2/sites-enabled/000-default.conf
-    state: absent
-  notify:
-    - Restart Apache
-
 - name: Add phpLDAPadmin Apache site
   template:
     src: phpmyadmin.conf.j2
@@ -41,10 +27,4 @@
     group: root
     mode: '0644'
   notify:
-    - Restart Apache
-
-- name: Allow HTTPS port
-  ufw:
-    rule: allow
-    port: https
-    proto: tcp
+    - Reload Apache
diff --git a/templates/phpmyadmin.conf.j2 b/templates/phpmyadmin.conf.j2
index 9c9ce9a..621ae7c 100644
--- a/templates/phpmyadmin.conf.j2
+++ b/templates/phpmyadmin.conf.j2
@@ -1,13 +1,4 @@
 {# Apache virtualhost template for phpLDAPadmin #}
 <VirtualHost _default_:443>
     DocumentRoot            /usr/share/phpldapadmin
-    SSLEngine               on
-    SSLCertificateFile      {{ openldap_tls_cert }}
-    SSLCertificateKeyFile   {{ openldap_tls_key }}
-    SSLProtocol             all -SSLv2 -SSLv3
-    SSLCipherSuite          !kRSA:!3DES:!RC4:!DES:!MD5:!aNULL:!NULL:AESGCM+ECDH:AES256+ECDH:AES128:+SHA1;
-    SSLHonorCipherOrder     on
-    SSLCompression          off
-    ErrorLog                ${APACHE_LOG_DIR}/error.log
-    CustomLog               ${APACHE_LOG_DIR}/access.log combined
 </virtualHost>
-- 
GitLab