mirror of
https://github.com/trailofbits/algo.git
synced 2026-09-11 04:07:48 +02:00
Fix GCE deployment error with Ansible 12 JSON parsing (#14860)
In Ansible 12, jinja2_native mode is always enabled, which changes how JSON strings are handled. The file lookup returns JSON content as a string, but it's no longer automatically converted to a dict. This caused GCE deployments to fail with "Invalid resource field value" because project_id was empty - accessing .project_id on a string returns undefined, which then defaulted to an empty env var. Add the `| from_json` filter to explicitly parse the JSON credentials file into a dict, as recommended by the Ansible 12 porting guide. Fixes #14854 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
no_log: true
|
||||
|
||||
- set_fact:
|
||||
credentials_file_lookup: "{{ lookup('file', credentials_file_path) }}"
|
||||
credentials_file_lookup: "{{ lookup('file', credentials_file_path) | from_json }}"
|
||||
no_log: true
|
||||
|
||||
- set_fact:
|
||||
|
||||
Reference in New Issue
Block a user