Refine deploy CLI, test-deploy workflow and Ansible output

Changes:
- Update GitHub Actions test-deploy workflow to run three staged deploys (normal+debug, reset+debug, async) using inventory-generated vault password files.
- Switch Ansible stdout_callback to ansible.builtin.default and enable YAML-style result_format via callback_default.
- Refactor cli/deploy.py: typed run_ansible_playbook(), structured MODE_* handling, better error reporting, and preserved vault/interactive behaviour.
- Add unit tests for deploy CLI (bool parsing, MODE_* loading, dynamic args, validation, and ansible-playbook command construction) under tests/unit/cli/test_deploy.py.

Context: see ChatGPT conversation on 2025-12-02: https://chatgpt.com/share/692f1035-6bc4-800f-91a9-342db54e1a75
This commit is contained in:
2025-12-02 20:25:26 +01:00
parent 8a453be4b9
commit 46174125bc
4 changed files with 502 additions and 126 deletions

View File

@@ -11,7 +11,7 @@ deprecation_warnings = True
interpreter_python = auto_silent
# --- Output & Profiling ---
stdout_callback = yaml
stdout_callback = ansible.builtin.default
callbacks_enabled = profile_tasks,timer
# --- Plugin paths ---
@@ -27,3 +27,6 @@ transfer_method = smart
[persistent_connection]
connect_timeout = 30
command_timeout = 60
[callback_default]
result_format = yaml