mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-17 17:26:42 +02:00
16 lines
521 B
YAML
16 lines
521 B
YAML
---
|
|
- name: Validate OpenResty configuration
|
|
command: >
|
|
docker exec {{ OPENRESTY_CONTAINER }} openresty -t -q
|
|
register: openresty_test
|
|
changed_when: false
|
|
failed_when: >
|
|
openresty_test.rc != 0 and
|
|
('is not running' not in ((openresty_test.stderr | default('')) | lower)) and
|
|
('no such container' not in ((openresty_test.stderr | default('')) | lower))
|
|
listen: restart openresty
|
|
|
|
- name: Restart OpenResty container
|
|
command: docker restart {{ OPENRESTY_CONTAINER }}
|
|
listen: restart openresty
|