Transform some handlers into tasks. Add the image pull policy.
This commit is contained in:
parent
df94a67fd2
commit
9e8361dd69
|
@ -70,6 +70,8 @@ shinyproxy_docker_privileged: 'false'
|
||||||
shinyproxy_docker_cpu_limit: 1
|
shinyproxy_docker_cpu_limit: 1
|
||||||
shinyproxy_docker_memory_request: '1g'
|
shinyproxy_docker_memory_request: '1g'
|
||||||
shinyproxy_docker_memory_limit: '2g'
|
shinyproxy_docker_memory_limit: '2g'
|
||||||
|
# Never, IfNotPresent and Always
|
||||||
|
shinyproxy_docker_image_pull_policy: IfNotPresent
|
||||||
shinyproxy_docker_internal_networking: 'false'
|
shinyproxy_docker_internal_networking: 'false'
|
||||||
shinyproxy_container_wait_time: 600000
|
shinyproxy_container_wait_time: 600000
|
||||||
shinyproxy_docker_loglevel: 'INFO'
|
shinyproxy_docker_loglevel: 'INFO'
|
||||||
|
|
|
@ -3,14 +3,3 @@
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: shinyproxy
|
name: shinyproxy
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: Stop the shinyproxy service
|
|
||||||
community.docker.docker_swarm_service:
|
|
||||||
name: "{{ shinyproxy_as_docker_stack_name }}_{{ shinyproxy_as_docker_service_name }}"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Create the secret for the application.yml file
|
|
||||||
community.docker.docker_secret:
|
|
||||||
name: "{{ shinyproxy_as_docker_stack_name }}_{{ shinyproxy_as_docker_service_name }}_application_yml"
|
|
||||||
data_src: '{{ shinyproxy_as_docker_src_dir }}/application.yml'
|
|
||||||
state: present
|
|
||||||
|
|
|
@ -37,12 +37,20 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0400"
|
mode: "0400"
|
||||||
notify:
|
register: shinyproxy_conf_file
|
||||||
- Stop the shinyproxy service
|
|
||||||
- Create the secret for the application.yml file
|
|
||||||
|
|
||||||
- name: shinyproxy_docker_stack_service | Flush the handlers to stop the shinyproxy service if needed
|
- name: shinyproxy_docker_stack_service | Stop the shinyproxy service
|
||||||
ansible.builtin.meta: flush_handlers
|
community.docker.docker_swarm_service:
|
||||||
|
name: "{{ shinyproxy_as_docker_stack_name }}_{{ shinyproxy_as_docker_service_name }}"
|
||||||
|
state: absent
|
||||||
|
when: shinyproxy_conf_file is changed # noqa: no-handler
|
||||||
|
|
||||||
|
- name: shinyproxy_docker_stack_service | Create the secret for the application.yml file
|
||||||
|
community.docker.docker_secret:
|
||||||
|
name: "{{ shinyproxy_as_docker_stack_name }}_{{ shinyproxy_as_docker_service_name }}_application_yml"
|
||||||
|
data_src: '{{ shinyproxy_as_docker_src_dir }}/application.yml'
|
||||||
|
state: present
|
||||||
|
when: shinyproxy_conf_file is changed # noqa: no-handler
|
||||||
|
|
||||||
- name: shinyproxy_docker_stack_service | Start the shinyproxy stack
|
- name: shinyproxy_docker_stack_service | Start the shinyproxy stack
|
||||||
community.docker.docker_stack:
|
community.docker.docker_stack:
|
||||||
|
|
|
@ -48,6 +48,7 @@ proxy:
|
||||||
container-memory-request: {{ shinyproxy_docker_memory_request }}
|
container-memory-request: {{ shinyproxy_docker_memory_request }}
|
||||||
container-memory-limit: {{ shinyproxy_docker_memory_limit }}
|
container-memory-limit: {{ shinyproxy_docker_memory_limit }}
|
||||||
container-cpu-limit: {{ shinyproxy_docker_cpu_limit }}
|
container-cpu-limit: {{ shinyproxy_docker_cpu_limit }}
|
||||||
|
image-pull-policy: {{ shinyproxy_docker_image_pull_policy }}
|
||||||
{% if not shinyproxy_as_docker_service %}
|
{% if not shinyproxy_as_docker_service %}
|
||||||
cert-path: {{ shinyproxy_docker_certs_dir }}
|
cert-path: {{ shinyproxy_docker_certs_dir }}
|
||||||
url: {{ shinyproxy_docker_url }}
|
url: {{ shinyproxy_docker_url }}
|
||||||
|
|
Loading…
Reference in New Issue