Commit 1cd4203
This commit addresses three critical compatibility issues with Ansible 12:
1. **Nested Jinja template deprecation warning**
- Fixed: `{{ lookup('file', '{{ SSH_keys.public }}') }}`
- Now: `{{ lookup('file', SSH_keys.public) }}`
- Location: files/cloud-init/base.sh:20
2. **String to boolean conversion errors in conditionals**
- Fixed: `when: item.item` (evaluates strings as truthy)
- Now: `when: item.item is defined and item.item != none`
- Location: roles/common/tasks/main.yml:20
3. **Sysctl list with None values causing boolean errors**
- Restructured list to dynamically exclude None entries
- IPv6 forwarding sysctl only added when ipv6_support is true
- Location: roles/common/tasks/ubuntu.yml:132
These changes maintain backward compatibility with older Ansible versions
while ensuring forward compatibility with Ansible 12's stricter type checking.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <[email protected]>
1 parent ac9d7b0 commit 1cd4203
File tree
3 files changed
+3
-11
lines changed- files/cloud-init
- roles/common/tasks
3 files changed
+3
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 132 | + | |
141 | 133 | | |
142 | 134 | | |
143 | 135 | | |
| |||
0 commit comments