Skip to content

Add default() filter to hetzner_volume_result deep attribute access #12

@pofallon

Description

@pofallon

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:

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt and code quality improvements

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions