roles/nginx/tasks/main.yml in taperole-1.6.0 vs roles/nginx/tasks/main.yml in taperole-1.7.0
- old
+ new
@@ -16,25 +16,24 @@
- name: Create self signed SSL cert/key
command: bash -lc "openssl req -x509 -sha256 -nodes -newkey rsa:2048 -keyout self-signed.key -out self-signed.crt -subj '/CN=localhost'"
args:
chdir: /etc/nginx/ssl
+ creates: /etc/nginx/ssl/self-signed.*
tags: [nginx]
- name: Create Diffie Hellman Ephemeral Parameters (this will take some time)
- command: bash -lc "openssl dhparam -out dhparam.pem 2048"
+ command: bash -lc "openssl dhparam -out dhparam.pem 2048" creates=/etc/nginx/ssl/dhparam.pem
args:
chdir: /etc/nginx/ssl
tags: [nginx]
- name: Configure App nginx
template: src=nginx_unicorn.j2 dest=/etc/nginx/sites-enabled/{{ app_name }}
tags: [nginx]
- name: Install monit nginx config
- template: src=nginx_monit.j2
- dest=/etc/monit/conf.d/nginx
- mode=u=rw,g=r,o=r
+ file: src=/etc/monit/conf-available/nginx dest=/etc/monit/conf-enabled/nginx owner=root group=root state=link
register: nginx_monit_config
- name: Reload Monit
command: bash -lc "monit reload && sleep 2"
when: nginx_monit_config.changed