Skip the layout guard under --check
Under --check the git task reports "changed" without writing anything, so on a host that has not been deployed yet there is no checkout to stat and the guard fired on a perfectly fine configuration - making `just check mediapis.yml musicdolphin` fail before the first real run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,9 @@
|
|||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: /opt/musicmouse/python-backend/pyproject.toml
|
path: /opt/musicmouse/python-backend/pyproject.toml
|
||||||
register: pi_musicmouse_pyproject
|
register: pi_musicmouse_pyproject
|
||||||
|
# Meaningless under --check on a host that has never been deployed: the git task
|
||||||
|
# above reports "changed" without writing anything, so there is nothing to stat.
|
||||||
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Fail on a pre-rearchitecture checkout
|
- name: Fail on a pre-rearchitecture checkout
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
@@ -57,7 +60,7 @@
|
|||||||
mediapi_install_kidsmusic to false for this host and leave whatever is installed
|
mediapi_install_kidsmusic to false for this host and leave whatever is installed
|
||||||
alone. Stopping here rather than failing three tasks deeper with the real reason
|
alone. Stopping here rather than failing three tasks deeper with the real reason
|
||||||
buried.
|
buried.
|
||||||
when: not pi_musicmouse_pyproject.stat.exists
|
when: not ansible_check_mode and not pi_musicmouse_pyproject.stat.exists
|
||||||
|
|
||||||
- name: Create virtualenv with Python {{ pi_musicmouse_python_version }}
|
- name: Create virtualenv with Python {{ pi_musicmouse_python_version }}
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
|
|||||||
Reference in New Issue
Block a user