Create the secret only when the configuration is changed.
This commit is contained in:
parent
52b516579a
commit
a98e9f2971
|
@ -8,3 +8,9 @@
|
|||
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,17 +37,13 @@
|
|||
owner: root
|
||||
group: root
|
||||
mode: "0400"
|
||||
notify: Stop the shinyproxy service
|
||||
notify:
|
||||
- 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
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- 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
|
||||
|
||||
- name: shinyproxy_docker_stack_service | Start the shinyproxy stack
|
||||
community.docker.docker_stack:
|
||||
name: '{{ shinyproxy_as_docker_stack_name }}'
|
||||
|
|
Loading…
Reference in New Issue