--- - name: Manage the installation of the REDIS service run_once: true tags: shinyproxy_redis, shinyproxy, shinyproxy_swarm, docker block: - name: Create the compose directory for the REDIS Swarm stack ansible.builtin.file: dest: "{{ shinyproxy_as_docker_src_dir }}" state: directory owner: root group: root mode: "0700" - name: Install the docker compose file of the REDIS Swarm stack ansible.builtin.template: src: shinyproxy-redis-docker-compose.yml.j2 dest: "{{ shinyproxy_as_docker_src_dir }}/shinyproxy-redis-docker-compose.yml" owner: root group: root mode: "0400" - name: Install the REDIS user configuration file ansible.builtin.template: src: shinyproxy-redis-users-config.acl.j2 dest: "{{ shinyproxy_as_docker_src_dir }}/shinyproxy-redis-users-config.acl" owner: root group: root mode: "0400" notify: - Stop the REDIS Swarm stack before creating the secrets - Remove the secret for the REDIS user configuration file - Restart shinyproxy - name: Flush the handlers so that we can manage the configuration file as a secret ansible.builtin.meta: flush_handlers - name: Start the REDIS Swarm stack community.docker.docker_stack: name: "{{ shinyproxy_as_docker_stack_name }}" state: present compose: - "{{ shinyproxy_as_docker_src_dir }}/shinyproxy-redis-docker-compose.yml"