diff options
Diffstat (limited to 'roles/my_server/tasks/main.yml')
-rw-r--r-- | roles/my_server/tasks/main.yml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/my_server/tasks/main.yml b/roles/my_server/tasks/main.yml index 36cb4cc..eaf6aa5 100644 --- a/roles/my_server/tasks/main.yml +++ b/roles/my_server/tasks/main.yml @@ -1,14 +1,14 @@ - name: 'Check if {{ server_dir }}/docker-compose.yml exists' become: true - stat: + ansible.builtin.stat: path: '{{ server_dir }}/docker-compose.yml' register: server_exists -- when: server_exists.stat.exists - name: Update containers +- name: Update containers + when: server_exists.stat.exists become: true # community.docker.docker_compose is too confusing for me to use, sorry. - shell: | + ansible.builtin.shell: | docker-compose pull -q && \ docker-compose build --force-rm --pull -q && \ docker-compose up --remove-orphans -d |