...
 
Commits (3)
...@@ -20,10 +20,13 @@ ...@@ -20,10 +20,13 @@
owner: "{{ apache_user }}" owner: "{{ apache_user }}"
group: "{{ apache_user }}" group: "{{ apache_user }}"
mode: 0640 mode: 0640
validate: 'apachectl -t -f %s'
register: apache_result
- name: a2ensite {{ privatebin_url }} - name: PRIVATEBIN | INSTALL | a2ensite {{ privatebin_url }}
command: a2ensite {{ privatebin_url }} command: a2ensite {{ privatebin_url }}
args: args:
creates: /etc/apache2/sites-enabled/{{ privatebin_url }}.conf creates: /etc/apache2/sites-enabled/{{ privatebin_url }}.conf
when: apache_result|success
notify: notify:
- restart apache - restart apache
...@@ -6,10 +6,12 @@ ...@@ -6,10 +6,12 @@
CustomLog ${APACHE_LOG_DIR}/privatebin-access.log combined CustomLog ${APACHE_LOG_DIR}/privatebin-access.log combined
{% if privatebin_ssl_cert is defined %} {% if privatebin_ssl_cert is defined %}
SSLEngine on SSLEngine on
SSLCertificateFile {{ privatebin_ssl_cert }} SSLCertificateFile {{ privatebin_ssl_cert }}
{% if privatebin_ssl_chain is defined %}SSLCertificateChainFile {{ privatebin_ssl_chain }}{% endif %} {% if privatebin_ssl_chain is defined %}
SSLCertificateKeyFile {{ privatebin_ssl_key }} SSLCertificateChainFile {{ privatebin_ssl_chain }}
{% endif %}
SSLCertificateKeyFile {{ privatebin_ssl_key }}
{% endif %} {% endif %}
<Directory {{ privatebin_install_path }}> <Directory {{ privatebin_install_path }}>
......