ansible-role-shinyproxy/tasks/shinyproxy_redis_service.yml

28 lines
891 B
YAML

---
- name: Manage the installation of the REDIS service
run_once: true
tags: shinyproxy_redis
block:
- name: Create the compose directory for the REDIS Swarm stack
ansible.builtin.file:
dest: "{{ shinyproxy_redis_compose_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: "{{ redis_compose_dir }}/shinyproxy-redis-docker-compose.yml"
owner: root
group: root
mode: "0400"
- name: Start the REDIS Swarm stack
community.docker.docker_stack:
name: "{{ shinyproxy_redis_docker_stack_name }}"
state: present
compose:
- "{{ shinyproxy_redis_compose_dir }}/shinyproxy-redis-docker-compose.yml"