parent
737dfbeb30
commit
c2685732a4
|
@ -2,21 +2,35 @@
|
|||
|
||||
- name: reload nginx
|
||||
command: nginx -t
|
||||
notify: real-reload nginx
|
||||
notify:
|
||||
- real-reload nginx
|
||||
- docker reload nginx
|
||||
|
||||
- name: restart nginx
|
||||
command: nginx -t
|
||||
notify: real-restart nginx
|
||||
notify:
|
||||
- real-restart nginx
|
||||
- docker restart nginx
|
||||
|
||||
- name: real-reload nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: reloaded
|
||||
when: ansible_virtualization_type != 'docker'
|
||||
|
||||
- name: real-restart nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
when: ansible_virtualization_type != 'docker'
|
||||
|
||||
- name: docker reload nginx
|
||||
command: service nginx reload
|
||||
when: ansible_virtualization_type == 'docker'
|
||||
|
||||
- name: docker restart nginx
|
||||
command: service nginx restart
|
||||
when: ansible_virtualization_type == 'docker'
|
||||
|
||||
- name: restart nginx freebsd
|
||||
service:
|
||||
|
|
|
@ -48,11 +48,15 @@
|
|||
with_items: "{{ acme_create }}"
|
||||
register: fake_site
|
||||
|
||||
- name: SERVICE | Reload nginx
|
||||
- name: SERVICE | Restart nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: reloaded
|
||||
when: fake_site.changed
|
||||
state: restarted
|
||||
when: fake_site.changed and ansible_virtualization_type != 'docker'
|
||||
|
||||
- name: COMMAND | Restart nginx
|
||||
command: service nginx restart
|
||||
when: fake_site.changed and ansible_virtualization_type == 'docker'
|
||||
|
||||
- name: SHELL | Get certificates
|
||||
shell: '{{ nginx_acmesh_bin }} --issue{% if item.name is string %} -d {{ item.name }}{% else %}{% for name in item.name %} -d {{ name }}{% endfor %}{% endif %} --nginx {% if nginx_acmesh_test %}--test{% endif %}'
|
||||
|
|
Loading…
Reference in New Issue