blob: eaf6aa5957c12995c012d953612422a17ec073d6 (
plain) (
tree)
|
|
- name: 'Check if {{ server_dir }}/docker-compose.yml exists'
become: true
ansible.builtin.stat:
path: '{{ server_dir }}/docker-compose.yml'
register: server_exists
- name: Update containers
when: server_exists.stat.exists
become: true
# community.docker.docker_compose is too confusing for me to use, sorry.
ansible.builtin.shell: |
docker-compose pull -q && \
docker-compose build --force-rm --pull -q && \
docker-compose up --remove-orphans -d
args:
chdir: '{{ server_dir }}'
|