homelab/roles/redis/tasks/persistent.yml

16 lines
406 B
YAML
Raw Normal View History

2024-10-21 20:46:58 +05:00
---
- name: Create docker volume
become: true
community.docker.docker_volume:
name: "{{ docker_volume }}"
- name: Run redis container
become: true
community.docker.docker_container:
name: "{{ container_name }}"
image: "{{ image }}"
command: "{{ shared_cmd }}"
networks: "{{ docker_networks }}"
volumes:
- "{{ docker_volume }}:/data"
restart_policy: unless-stopped