Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roles can fail if the skip_install variable is set to true for a subset of the hosts the role is being used on #279

Open
alkinks opened this issue Jan 16, 2024 · 0 comments

Comments

@alkinks
Copy link
Contributor

alkinks commented Jan 16, 2024

If, for a group of hosts you have _skip_install set to true for a subset of those hosts & the playbook runs on one of this subset first, the run_once means the task to get the binary checksums is skipped, and subsequent tasks will fail.

Running molecule converge on the current chrony_exporter role, with chrony_exporter_skip_install=true I get this output (truncated).

I'd get the same issue for all hosts if chrony_exporter_skip_install=true was just set for the almalinux-8 host as that's the first host to be tried.

TASK [chrony_exporter : Discover latest version] *******************************
skipping: [almalinux-8] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [chrony_exporter : Get checksum list from github] *************************
skipping: [almalinux-8] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [chrony_exporter : Get checksum for amd64] ********************************
skipping: [almalinux-8] => {"changed": false, "skip_reason": "Conditional result was False"}
fatal: [almalinux-9]: FAILED! => {"msg": "'__chrony_exporter_checksums' is undefined"}
fatal: [centos-7]: FAILED! => {"msg": "'__chrony_exporter_checksums' is undefined"}
fatal: [centos-stream-8]: FAILED! => {"msg": "'__chrony_exporter_checksums' is undefined"}
fatal: [debian-10]: FAILED! => {"msg": "'__chrony_exporter_checksums' is undefined"}
fatal: [debian-11]: FAILED! => {"msg": "'__chrony_exporter_checksums' is undefined"}
fatal: [fedora-37]: FAILED! => {"msg": "'__chrony_exporter_checksums' is undefined"}
fatal: [fedora-38]: FAILED! => {"msg": "'__chrony_exporter_checksums' is undefined"}
fatal: [ubuntu-20.04]: FAILED! => {"msg": "'__chrony_exporter_checksums' is undefined"}
fatal: [ubuntu-22.04]: FAILED! => {"msg": "'__chrony_exporter_checksums' is undefined"}

NO MORE HOSTS LEFT *************************************************************

PLAY RECAP *********************************************************************
almalinux-8                : ok=8    changed=0    unreachable=0    failed=0    skipped=9    rescued=0    ignored=0
almalinux-9                : ok=8    changed=0    unreachable=0    failed=1    skipped=6    rescued=0    ignored=0
centos-7                   : ok=8    changed=0    unreachable=0    failed=1    skipped=6    rescued=0    ignored=0
centos-stream-8            : ok=8    changed=0    unreachable=0    failed=1    skipped=6    rescued=0    ignored=0
centos-stream-9            : ok=8    changed=0    unreachable=0    failed=1    skipped=6    rescued=0    ignored=0
debian-10                  : ok=9    changed=0    unreachable=0    failed=1    skipped=5    rescued=0    ignored=0
debian-11                  : ok=9    changed=0    unreachable=0    failed=1    skipped=5    rescued=0    ignored=0
fedora-37                  : ok=8    changed=0    unreachable=0    failed=1    skipped=6    rescued=0    ignored=0
fedora-38                  : ok=8    changed=0    unreachable=0    failed=1    skipped=6    rescued=0    ignored=0
ubuntu-20.04               : ok=9    changed=0    unreachable=0    failed=1    skipped=5    rescued=0    ignored=0
ubuntu-22.04               : ok=9    changed=0    unreachable=0    failed=1    skipped=5    rescued=0    ignored=0

The download of the checksum needs to happen on at least one not skipped host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant