Skip to content

Role is not idempotent in CI #645

@robpou

Description

@robpou

The collection's roles (so _common/install.yml in general) use a cache directory for the downloads and download the binaries to this directory on the controller node, before propagating them to the inventory hosts.

This means when running in a CI pipeline, the plays for creating the local cache path and downloading/unpacking the binary will always count as changes, hence the role is not idempotent.

Am I overlooking something? PR #499 could help by at least letting the inventory hosts perform the problematic steps, but it's been abandoned and that also wouldn't work with /tmp, but sure one could take a different local cache path e.g. /opt etc.

Could something like

changed_when: (lookup('env', 'CI', default='false') | bool) | ternary(false, omit)

help for these tasks or nah? (Prob not)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions