check repo before cloning

This commit is contained in:
Antonio J. Delgado 2022-11-19 20:49:16 +02:00
parent 9e2dab65f0
commit bbd15d539f

View file

@ -1,10 +1,15 @@
--- ---
- name: Asses state of local repo
stat:
path: "{{ mastodon_composer_folder }}"
register: repo_folder
- name: Clone Mastodon repo - name: Clone Mastodon repo
git: git:
repo: https://github.com/mastodon/mastodon.git repo: https://github.com/mastodon/mastodon.git
dest: "{{ mastodon_composer_folder }}" dest: "{{ mastodon_composer_folder }}"
depth: 1 depth: 1
ignore_errors: true when: not repo_folder.stat.exists
- name: Copy Dockerfile from Mastodon repo - name: Copy Dockerfile from Mastodon repo
copy: copy: