From 4c3323940373944ebf38b90cdd127cd94222397c Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 10 Dec 2015 20:01:02 +0200 Subject: [PATCH] Depend on Apache role, remove unnecessary tasks and config. --- meta/main.yml | 3 ++- tasks/main.yml | 25 +------------------------ templates/owncloud.conf.j2 | 10 ---------- 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 803e076..6733de8 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -7,4 +7,5 @@ galaxy_info: min_ansible_version: 1.2 #platforms: #categories: -dependencies: [] +dependencies: +- apache diff --git a/tasks/main.yml b/tasks/main.yml index 8e89f3c..af9d82f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -73,23 +73,6 @@ state: present minute: '*/15' -- name: Enable mod-ssl in Apache - with_items: - - ssl - - headers - apache2_module: - name: '{{ item }}' - 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 ownCloud Apache site template: src: owncloud.conf.j2 @@ -98,13 +81,7 @@ group: root mode: '0644' notify: - - Restart Apache - -- name: Open https port in firewall - ufw: - rule: allow - port: 443 - proto: tcp + - Reload Apache - name: Add daily backup job template: diff --git a/templates/owncloud.conf.j2 b/templates/owncloud.conf.j2 index f0bc255..153249f 100644 --- a/templates/owncloud.conf.j2 +++ b/templates/owncloud.conf.j2 @@ -1,13 +1,3 @@ <VirtualHost _default_:443> DocumentRoot /var/www/owncloud/ - SSLEngine on - SSLCertificateFile {{ tls_cert_path }} - SSLCertificateKeyFile {{ tls_key_path }} - SSLProtocol all -SSLv2 -SSLv3 - SSLCipherSuite !kRSA:!3DES:!RC4:!DES:!MD5:!aNULL:!NULL:AESGCM+ECDH:AES256+ECDH:AES128:+SHA1; - SSLHonorCipherOrder on - SSLCompression off - Header always set Strict-Transport-Security "max-age=15768000;includeSubDomains; preload" - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined </virtualHost> -- GitLab