Add default() filter to hetzner_volume_result deep attribute access
Open
tech-debt
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 15h 59m
- Merged PRs (30d)
- 9
Description
## Description
`hetzner_volume_result.hcloud_volume.size` on line 90 of `ansible/roles/hetzner_server/tasks/main.yml` accesses a deep nested attribute without a `| default()` filter:
```yaml
when: hetzner_volume_result.hcloud_volume.size < hetzner_volume_size | int
```
If the volume creation task was skipped or failed in an unexpected way, this would produce an Ansible error rather than a graceful skip.
## Recommended fix
```yaml
when: (hetzner_volume_result.hcloud_volume.size | default(0)) < (hetzner_volume_size | int)
```
## Priority
Low — the task is unlikely to be skipped in practice since it runs unconditionally.
Contributor guide
Assessment
This issue has not been assessed yet.