`--start-at-task "Deploy app"` fails with `'artifact_url' is undefined`
IntermediateTroubleshootingVault, Performance and Execution Behaviour
Answer
Likely causes → --start-at-task skips everything before that task, including the set_fact, register or include_vars tasks that define later variables.
Fix → Tag the tasks that define variables with always, so they run even when skipped over:
- ansible.builtin.set_fact:
artifact_url: "{{ repo_url }}/{{ app_version }}/app.tgz"
tags: [always]
Alternatively, use --tags deploy with well-tagged roles instead of --start-at-task.
Prevent → Compute derived variables in vars or defaults (evaluated lazily) instead of in set_fact where possible.
More on Vault, Performance and Execution Behaviour
`ERROR! Attempting to decrypt but no vault secrets found`Beginner`ERROR! Decryption failed (no vault secrets were found that could decrypt) on inventories/prod/group_vars/all/vault.yml`BeginnerBoth `--vault-id [email protected]` and `--vault-id prod@prompt` are passed, and prod files still fail to decryptIntermediate`Vault format unhexlify error: Odd-length string` after pasting an `encrypt_string` valueIntermediate`Problem running vault password script /home/ci/.vault_pass ([Errno 8] Exec format error). If this is not a script, remove the executable bit from the file.`AdvancedEvery change to `vault.yml` produces an unreadable diff and constant merge conflictsIntermediate