mirror of
https://github.com/trailofbits/algo.git
synced 2026-08-17 21:25:50 +02:00
This commit addresses two issues affecting AWS deployments in Ansible 12:
1. **EC2 credentials not being passed correctly**
- The `default()` filter chain wasn't handling empty strings properly
- In Ansible 12 with mandatory jinja2_native, `lookup('env', 'VAR')` returns
an empty string (not undefined) when the env var is not set
- Empty strings are "defined" values, so `default()` doesn't trigger
- Fix: Add `true` as second parameter to `default()` to also handle falsy values
2. **CloudFormation deprecated template parameter**
- The `template` parameter is deprecated (removal after 2026-05-01)
- Migrate to `template_body` with file lookup as recommended
- Applied to both EC2 and Lightsail cloudformation tasks
These changes ensure AWS deployments work correctly with Ansible 12's
stricter type handling while also addressing deprecation warnings.
Fixes #14842
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>