aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-01-26 16:17:37 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-01-26 16:17:37 +0100
commit220cff6e1c85d6489925c74ee31accf27be3fa59 (patch)
tree3f4bf0e8e0763ce15f6bd0af332ad52f7c73036c
parentsnap: forgot to remove the extra conditional (diff)
downloadmaintenance-220cff6e1c85d6489925c74ee31accf27be3fa59.tar.gz
maintenance-220cff6e1c85d6489925c74ee31accf27be3fa59.zip
my_server: one step instead of three
Diffstat (limited to '')
-rw-r--r--roles/my_server/tasks/main.yml24
1 files changed, 8 insertions, 16 deletions
diff --git a/roles/my_server/tasks/main.yml b/roles/my_server/tasks/main.yml
index d88bb86..277f2d1 100644
--- a/roles/my_server/tasks/main.yml
+++ b/roles/my_server/tasks/main.yml
@@ -5,20 +5,12 @@
register: server_exists
- when: server_exists.stat.exists
+ name: Update containers
become: true
- block:
- # community.docker.docker_compose is too confusing for me to use, sorry.
- - name: docker-compose pull
- command: docker-compose pull --quiet
- args:
- chdir: '{{ server_dir }}'
-
- - name: docker-compose build
- command: docker-compose build --pull
- args:
- chdir: '{{ server_dir }}'
-
- - name: docker-compose up
- command: docker-compose up -d
- args:
- chdir: '{{ server_dir }}'
+ # community.docker.docker_compose is too confusing for me to use, sorry.
+ shell: |
+ docker-compose pull --quiet && \
+ docker-compose build --pull && \
+ docker-compose up -d
+ args:
+ chdir: '{{ server_dir }}'