playbooks/redis/playbook.yml
2022-08-02 06:40:29 +05:30

22 lines
478 B
YAML
Executable File

---
- hosts: all
become: true
vars_files:
- vars/default.yml
tasks:
- name: Pull default redis image
docker_image:
name: "{{ container_image }}"
source: pull
force_source: yes
- name: Create redis container
docker_container:
name: "{{ container_name }}"
image: "{{ container_image }}"
state: started
restart_policy: "unless-stopped"
published_ports:
- 127.0.0.1:6379:6379