File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 56
56
command : python3.11 -m pip install --upgrade pip
57
57
become : yes
58
58
59
+ - name : Check if directory is a git repository
60
+ stat :
61
+ path : ' {{ ansible_env.HOME }}/draft/.git'
62
+ register : git_repo
63
+
59
64
- name : Clone repository if it doesn't exist
60
65
git :
61
66
repo : ' https://github.com/private-attribution/draft.git'
62
67
dest : ' {{ ansible_env.HOME }}/draft'
63
- update : no
68
+ when : not git_repo.stat.exists
69
+
70
+
71
+ - name : Pull repository if it does exist
72
+ git :
73
+ repo : ' https://github.com/private-attribution/draft.git'
74
+ dest : ' {{ ansible_env.HOME }}/draft'
75
+ clone : false
76
+ version : main
77
+ when : git_repo.stat.exists
64
78
65
79
- name : Create virtualenv if it doesn't exist
66
80
command : python3.11 -m venv .venv
You can’t perform that action at this time.
0 commit comments