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 5656 command : python3.11 -m pip install --upgrade pip
5757 become : yes
5858
59+ - name : Check if directory is a git repository
60+ stat :
61+ path : ' {{ ansible_env.HOME }}/draft/.git'
62+ register : git_repo
63+
5964 - name : Clone repository if it doesn't exist
6065 git :
6166 repo : ' https://github.com/private-attribution/draft.git'
6267 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
6478
6579 - name : Create virtualenv if it doesn't exist
6680 command : python3.11 -m venv .venv
You can’t perform that action at this time.
0 commit comments