Skip to content

Commit cff5ebc

Browse files
author
Kroner
committed
-callback + fix deploy-docker
1 parent f262a53 commit cff5ebc

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

ansible.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[defaults]
2-
stdout_callback = log_plays
32
log_path = ~/ansible.log
43
cache_plugin = jsonfile
54
cache_path = ~/.ansible/inventory_cache

deploy-docker.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,21 @@
4242
state: started
4343
enabled: yes
4444

45-
- name: Clone repository
46-
git:
47-
repo: "{{ repo_url }}"
45+
- name: Check if repo exists
46+
stat:
47+
path: "{{ app_dir }}/.git"
48+
register: repo_exists
49+
50+
- name: Clone or update repo
51+
git:
52+
repo: "{{ repo_url }}"
4853
dest: "{{ app_dir }}"
49-
clone: yes
50-
update: yes
54+
update: "{{ repo_exists.stat.exists }}"
55+
force: yes
56+
version: "main"
5157

5258
- name: Run Docker Compose
53-
command: docker compose up -d
59+
command: docker compose up -d --force-recreate
5460
args:
5561
chdir: "{{ app_dir }}"
5662

0 commit comments

Comments
 (0)