-
Notifications
You must be signed in to change notification settings - Fork 132
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
fix: using skip install on a subset of a group of hosts #252
fix: using skip install on a subset of a group of hosts #252
Conversation
When a role skip_install variable is set to true for some, but not all hosts, it is possible for the checksums to not get downloaded, and the tasks will fail. This puts those tasks in an included task file Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: ScarletBlizzard <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
…test molecule wrapper Signed-off-by: gardar <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: gardar <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: gardar <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: gardar <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: ScarletBlizzard <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: prombot <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: Nikolay Asenov <[email protected]> Signed-off-by: Ben Kochie <[email protected]> Co-authored-by: Ben Kochie <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: Christian Krause <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: Christian Krause <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: Christian Krause <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
…sses Signed-off-by: Christian Krause <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
…esses Signed-off-by: Christian Krause <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
…eflight this is for consistency with the other roles' preflight asserts for when prometheus itself finally supports multiple web listen addresses Signed-off-by: Christian Krause <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
…s in preflight this is for consistency with the other roles' preflight asserts for when the exporter itself finally supports multiple web listen addresses Signed-off-by: Christian Krause <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
… in preflight this is for consistency with the other roles' preflight asserts for when the exporter itself finally supports multiple web listen addresses Signed-off-by: Christian Krause <[email protected]> Signed-off-by: Andrew Kingston <[email protected]>
Signed-off-by: Andrew Kingston <[email protected]>
bfa17da
to
a8183dd
Compare
Signed-off-by: alkinks <[email protected]>
There is a similar issue with the check for the latest versions. If you wanted "latest" version for any host other than the first host the playbook gets run on, then the role would skip determining what the latest version is. |
Adding issue: #279 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tried this change yet but does moving the task from a block to include_tasks really work?
I would think that it would either end with the same result as the block or run the checksum fetch for all of the hosts and bypassing the run_once
This does seem to work as is intended. I set up the molecule provisioner like so: provisioner:
playbooks:
converge: "${MOLECULE_PROJECT_DIRECTORY}/../../.config/molecule/converge.yml"
inventory:
host_vars:
almalinux-8:
alertmanager_skip_install: true
almalinux-9:
alertmanager_skip_install: true
centos-7:
alertmanager_skip_install: true
fedora-38:
alertmanager_skip_install: true Then ran converge for the alertmanager role: molecule converge -- --diff -v
.
.
.
TASK [../roles/alertmanager : Discover latest version] *************************
skipping: [almalinux-8] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [../roles/alertmanager : Get alertmanager binary checksum] ****************
skipping: [almalinux-8] => {"changed": false, "skip_reason": "Conditional result was False"}
skipping: [almalinux-9] => {"changed": false, "skip_reason": "Conditional result was False"}
skipping: [centos-7] => {"changed": false, "skip_reason": "Conditional result was False"}
skipping: [fedora-38] => {"changed": false, "skip_reason": "Conditional result was False"}
included: /net/homes/akingsto/git/prometheus.prometheus/roles/alertmanager/tasks/get_checksum.yml for centos-stream-8, centos-stream-9, debian-10, debian-11, fedora-37, ubuntu-20.04, ubuntu-22.04
TASK [../roles/alertmanager : Get checksum list] *******************************
ok: [centos-stream-8] => {"ansible_facts": {"__alertmanager_checksums": ["3dce2314b956bdf39599912c28ebb79aac533e4ceb36d608a3efbdd109bc5912 alertmanager-0.26.0.darwin-amd64.tar.gz",
279265678d4052f4d398b1603c610e1937074c795ea6c9c348a9da2efdb87748 alertmanager-0.26.0.darwin-arm64.tar.gz",
511f8f74a9deef04f8872ce35e80e419e6f0b1d0a7be075d9522725a8a52b3c7 alertmanager-0.26.0.dragonfly-amd64.tar.gz",
a6ed1691f520468a9bc58580d4ab45a85460b3255f0399433ecf5cda4b5f4569 alertmanager-0.26.0.freebsd-386.tar.gz",
8b1b0a51dc8dc80ed0d2a6d2ce9e5b03c699cffd294e05f470b72bcfa483f8a2 alertmanager-0.26.0.freebsd-amd64.tar.gz",
1b01e12ee84ac9f17de909eaab8680fd0d3e6e4f300396c02415d640f6249337 alertmanager-0.26.0.freebsd-arm64.tar.gz",
e94b011e48a5fc44e6571048a17d5a51e0dc4f2ff2316f08121cb968da65cfa4 alertmanager-0.26.0.freebsd-armv6.tar.gz",
067b9441d4b52238d571aa5c705ccc8a97005cd3d57ec60b3d28c7688552e77a alertmanager-0.26.0.freebsd-armv7.tar.gz",
9628a016af5247278d9df42fb6c45e7afbf673df92a5b5c4cb6953e087014e94 alertmanager-0.26.0.illumos-amd64.tar.gz",
bd002d98e0b2b84aa5db335711f44bcf9df8072bb97cd7ec7cc6e1a3231f6111 alertmanager-0.26.0.linux-386.tar.gz",
abd73e2ee6bf67d3888699660abbecba7b076bf1f9459a3a8999d493b149ffa6 alertmanager-0.26.0.linux-amd64.tar.gz",
f65969661821570929ad34cf64e034fe72c8e014855d244321c67a0c3ce3fc08 alertmanager-0.26.0.linux-arm64.tar.gz",
f7f5dc4b2c5edbb5d12c16076dcba3c1d60395ef061a0a229e08661a39784abf alertmanager-0.26.0.linux-armv5.tar.gz",
dedb691e494d7670b78728d70ded8e78d4f1fea1c00d384a793ad6040c6af853 alertmanager-0.26.0.linux-armv6.tar.gz",
1a88a94c1f6cce900f49daba6142a5900afc92619ce98864663338d74bcf1685 alertmanager-0.26.0.linux-armv7.tar.gz", 716256ea7fc831fc68cb6beff6d90e59c3dd759cdbca8e2f5886cbee10794b31 alertmanager-0.26.0.linux-mips.tar.gz",
9ed49f4959609d41fc6b2739b6ef68bf1e717fcf39c439241fda31d63752606b alertmanager-0.26.0.linux-mips64.tar.gz",
354d9dcaaf528ef8bfec86ad66a7514b4198610dc622faa6cbb5dd19afab6e65 alertmanager-0.26.0.linux-mips64le.tar.gz",
78510fcf2dc3b84b8bd28703a830e9be656b8b211b1f0a1b8ce05e272a2d3f85 alertmanager-0.26.0.linux-mipsle.tar.gz",
40d46168465ed1a9275d6684486a01bff8b663c6e974f4f85042e01d9ef62015 alertmanager-0.26.0.linux-ppc64.tar.gz",
5ccbb4d864fa3785f75667ce59ef2b6ca5794d8c954f56a58551a3175b701928 alertmanager-0.26.0.linux-ppc64le.tar.gz",
2e8f10be68680045308f77f344f19a08d939941a9286f2f4952ef9a21af9e593 alertmanager-0.26.0.linux-s390x.tar.gz",
49d5e4cb2995fd2270cb512f93a0bc4c598d9acbe1caf16c3c5106ba391b39bd alertmanager-0.26.0.netbsd-386.tar.gz",
fbb82c65fb1a2bb5a1641854d6f1912b33d3036025a1ac2dd9786e999e2787f4 alertmanager-0.26.0.netbsd-amd64.tar.gz",
e3d1e953cc85f3ae357f878716201584054912030e153d0a179c25e982c11733 alertmanager-0.26.0.netbsd-arm64.tar.gz",
d0b3ec50d9dbce3d60b6efac67e0b9350d759e835c2b26f881e632080a1f1d90 alertmanager-0.26.0.netbsd-armv6.tar.gz",
8736a2b34f9b761a283246a2c1750c797f3ad19dadb05cc13a6f364e77c542e5 alertmanager-0.26.0.netbsd-armv7.tar.gz",
9c977a0bb2ca368b247f7bb5eeca0055619cb0ece170f41c2d0167a9f4f7a087 alertmanager-0.26.0.openbsd-386.tar.gz",
ea20b42224694b9b1788e5de8eba6c4f633381c936ba9c614f7666ac02bb2754 alertmanager-0.26.0.openbsd-amd64.tar.gz",
de4b79bd913456b7dc4ca2a5ac16ae2a8337a411b750a9260394632abca0c735 alertmanager-0.26.0.openbsd-arm64.tar.gz",
4ba50ede07eaf17a84582f13af91b4aae83788c1cd63686668a28b60f1242994 alertmanager-0.26.0.openbsd-armv7.tar.gz",
85d6619b0a16d039647865a05d2eff22c20258120900f19451e95426c229b4de alertmanager-0.26.0.windows-386.tar.gz",
4d8e9978d3c714f64a7ff76054325cc2cfcc78c1722c97093687b629e5f3bbac alertmanager-0.26.0.windows-386.zip",
dc26fc8f9ef8b3801069803f50ae182c8b84620de3a94e0adc90c0669bc5af76 alertmanager-0.26.0.windows-amd64.tar.gz",
4f170342f31f27ac1a1c7b1cd5df928a184eed49f65a39327c00aa3927a6e020 alertmanager-0.26.0.windows-amd64.zip",
37f210b6370c87083f9a9fc2af98a79c2deb35b78513b72848fd20f1ad5048a0 alertmanager-0.26.0.windows-arm64.tar.gz",
f6694fb511ade5ab467b0b2ad15eb01e1aa973f822e3fadaf6b1a7b5f7245e0c alertmanager-0.26.0.windows-arm64.zip",
e8f956900edca20f2c33bca1d46458a45c519158cbc330acf232ad2742c45e49 alertmanager-web-ui-0.26.0.tar.gz"]}, "attempts": 1,
changed": false}
TASK [../roles/alertmanager : Get checksum for amd64] ************************** You can see the Then the The task set to |
Obsoleted by #425 Please use |
Docs Build 📝This PR is closed and any previously published docsite has been unpublished. |
If, for a group of hosts you have <role name>_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).On my branch you get this (truncated):
Which runs the download of the checksums once on a host which isn't skipped.