# Variables below don't appear in Mezannine's fabfile.py
# but I've added them for convenience
conf_path: /etc/nginx/conf
- ssl_enabled: True
+ tls_enabled: True
python: "{{ venv_path }}/bin/python"
database_name: "{{ proj_name }}"
database_user: "{{ proj_name }}"
- name: ensure config path exists
file: path={{ conf_path }} state=directory
sudo: True
- when: ssl_enabled
+ when: tls_enabled
- name: create ssl certificates
command: >
openssl req -new -x509 -nodes -out {{ proj_name }}.crt
chdir={{ conf_path }}
creates={{ conf_path }}/{{ proj_name }}.crt
sudo: True
- when: ssl_enabled
+ when: tls_enabled
notify: restart nginx
- name: install poll twitter cron job
cron: name="poll twitter" minute="*/5" user={{ user }} job="{{ manage }} poll_twitter"
listen 80;
- {% if ssl_enabled %}
+ {% if tls_enabled %}
listen 443 ssl;
{% endif %}
server_name {{ domains|join(", ") }};
client_max_body_size 10M;
keepalive_timeout 15;
- {% if ssl_enabled %}
+ {% if tls_enabled %}
ssl_certificate conf/{{ proj_name }}.crt;
ssl_certificate_key conf/{{ proj_name }}.key;
ssl_session_cache shared:SSL:10m;
- name: ensure config path exists
file: path={{ mezzanine_conf_path }} state=directory
sudo: True
- when: ssl_enabled
+ when: tls_enabled
- name: install poll twitter cron job
cron: >
name="poll twitter" minute="*/5" user={{ mezzanine_user }}
listen 80;
- {% if ssl_enabled %}
+ {% if tls_enabled %}
listen 443 ssl;
{% endif %}
server_name {{ domains|join(", ") }};
client_max_body_size 10M;
keepalive_timeout 15;
- {% if ssl_enabled %}
+ {% if tls_enabled %}
ssl_certificate conf/{{ mezzanine_proj_name }}.crt;
ssl_certificate_key conf/{{ mezzanine_proj_name }}.key;
ssl_session_cache shared:SSL:10m;