parent
737dfbeb30
commit
c2685732a4
|
@ -2,21 +2,35 @@
|
||||||
|
|
||||||
- name: reload nginx
|
- name: reload nginx
|
||||||
command: nginx -t
|
command: nginx -t
|
||||||
notify: real-reload nginx
|
notify:
|
||||||
|
- real-reload nginx
|
||||||
|
- docker reload nginx
|
||||||
|
|
||||||
- name: restart nginx
|
- name: restart nginx
|
||||||
command: nginx -t
|
command: nginx -t
|
||||||
notify: real-restart nginx
|
notify:
|
||||||
|
- real-restart nginx
|
||||||
|
- docker restart nginx
|
||||||
|
|
||||||
- name: real-reload nginx
|
- name: real-reload nginx
|
||||||
service:
|
service:
|
||||||
name: nginx
|
name: nginx
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
when: ansible_virtualization_type != 'docker'
|
||||||
|
|
||||||
- name: real-restart nginx
|
- name: real-restart nginx
|
||||||
service:
|
service:
|
||||||
name: nginx
|
name: nginx
|
||||||
state: restarted
|
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
|
- name: restart nginx freebsd
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -48,11 +48,15 @@
|
||||||
with_items: "{{ acme_create }}"
|
with_items: "{{ acme_create }}"
|
||||||
register: fake_site
|
register: fake_site
|
||||||
|
|
||||||
- name: SERVICE | Reload nginx
|
- name: SERVICE | Restart nginx
|
||||||
service:
|
service:
|
||||||
name: nginx
|
name: nginx
|
||||||
state: reloaded
|
state: restarted
|
||||||
when: fake_site.changed
|
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
|
- 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 %}'
|
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