[FIX] repo: на чистом узле нет репозитория, проверка грязного дерева пропускается
This commit is contained in:
+8
-2
@@ -120,20 +120,26 @@
|
||||
SERVER={{ server_ip }}
|
||||
tags: [env]
|
||||
|
||||
- name: Репозиторий уже клонирован?
|
||||
ansible.builtin.stat:
|
||||
path: ~/hackrf-scanner/.git
|
||||
register: repo_dir
|
||||
tags: [repo]
|
||||
|
||||
- name: Локальные правки в репо (rsync-разработка)?
|
||||
ansible.builtin.command: git status --porcelain
|
||||
args:
|
||||
chdir: ~/hackrf-scanner
|
||||
register: dirty
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
when: repo_dir.stat.exists
|
||||
tags: [repo]
|
||||
|
||||
- name: Stash локальных правок перед обновлением
|
||||
ansible.builtin.command: git stash push -m fleet-provision
|
||||
args:
|
||||
chdir: ~/hackrf-scanner
|
||||
when: dirty.rc == 0 and dirty.stdout != ""
|
||||
when: repo_dir.stat.exists and dirty.stdout != ""
|
||||
tags: [repo]
|
||||
|
||||
- name: Репозиторий hackrf-scanner
|
||||
|
||||
Reference in New Issue
Block a user