get2knowio / get2knowio/remo

Add default() filter to hetzner_volume_result deep attribute access

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.