fc8a7795e6
Added: Restart policy
20 lines
396 B
YAML
Executable File
20 lines
396 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
|
|
|
|
- name: Create redis container
|
|
docker_container:
|
|
name: "{{ container_name }}"
|
|
image: "{{ container_image }}"
|
|
state: started
|
|
restart_policy: "unless-stopped"
|
|
|