23 lines
639 B
YAML
23 lines
639 B
YAML
![]() |
---
|
||
|
- hosts: snickers-docker
|
||
|
gather_facts: no
|
||
|
vars:
|
||
|
verbose: false
|
||
|
compose_folder: "/mnt/docker-storage/radiator-web/"
|
||
|
|
||
|
tasks:
|
||
|
- name: Ensures {{ compose_folder }} dir exists
|
||
|
stat:
|
||
|
path: "{{ compose_folder }}docker-compose.yml"
|
||
|
register: file_details
|
||
|
|
||
|
- name: Fail if docker-compose file doesn't exist
|
||
|
fail:
|
||
|
msg: "docker-compose.yml doesn't exist in expected location (expected in {{ compose_folder }})"
|
||
|
when: not file_details.stat.exists
|
||
|
|
||
|
- name: Update container image
|
||
|
community.general.docker_compose:
|
||
|
project_src: "{{ compose_folder }}"
|
||
|
pull: yes
|