Add checksum support for Platform RPMs - #372
Open
mazam32-itential wants to merge 1 commit into
Open
Conversation
Some customers require RPM checksums to be validated before install.
Add an optional checksum parameter to the get_url task that downloads
Platform RPMs from a repository (Nexus/JFrog/etc.), sourced from a new
platform_package_checksums dict keyed by download URL. URLs with no
matching entry are downloaded without verification, preserving today's
default behavior for anyone who doesn't opt in.
Only the repository-download (get_url) path is affected. The local/
manual-upload path uses the copy module, which has no checksum
parameter, and was out of scope for this ticket.
Tested end-to-end against a live EC2 instance (Rocky Linux 9, AIO
topology), using the real Itential Platform 6.5.1 RPM from Nexus and
its officially published .sha256 checksum:
- Positive test: platform_package_checksums set to the real published
checksum (sha256:440353320215dcc737184744579362d78400da0bc46839fa4
f6d220129843531). Ran `ansible-playbook itential.deployer.platform`
- the download task succeeded ("msg": "OK (134380937 bytes)",
status_code 200), Platform installed and itential-platform.service
came up active.
- Negative test: same run, with platform_package_checksums changed to
a deliberately wrong all-zero value. The download task failed
immediately:
"The checksum for .../itential-platform-6.5.1-1.noarch.rpm did not
match 0000...0000; it was 440353...843531."
confirming get_url is genuinely hashing the downloaded file and
comparing it - the computed hash it reports matches the real
Nexus-published checksum from the positive test. The play stopped
there (failed=1), before the RPM reached the dnf install step.
- ansible-lint on both changed task/defaults files passes clean
(0 failures, 0 warnings).
Nick-Andreano
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
checksumparameter to theget_urltask inroles/platform/tasks/download-platform-archive-from-repo.ymlthat downloads Platform RPMs from a repository (Nexus/JFrog/etc.).platform_package_checksumsdict (default{}), keyed by the exact download URL, added toroles/platform/defaults/main/platform.yml.platform_package_checksumsare downloaded without verification — fully backward compatible, opt-in only.get_url) path is affected, per the ticket. The local/manual-upload path uses thecopymodule, which has nochecksumparameter — out of scope here.docs/itential_platform_guide.mdandroles/platform/CLAUDE.mdto document the new variable.How this was tested
Tested end-to-end against a live EC2 instance (Rocky Linux 9, AIO topology), using the real Itential Platform 6.5.1 RPM from Nexus and its officially published
.sha256checksum (Nexus publishes.sha256files alongside newer Platform RPM releases).Positive test —
platform_package_checksumsset to the real published checksum:Ran
ansible-playbook itential.deployer.platform -i inventories/aio/hosts.yaml --tags platform_install. Result: download task succeeded ("msg": "OK (134380937 bytes)",status_code: 200), Platform installed,itential-platform.servicecame upactive.Negative test — same run, only the checksum value changed to a deliberately wrong all-zero string. Result: the download task failed immediately:
Play recap:
failed=1— the play stopped at the download task, before the RPM ever reached thednf installstep. Note the computed hashget_urlreports in the error exactly matches the real Nexus-published checksum from the positive test, confirming this is a genuine hash-and-compare, not a no-op.Lint:
ansible-linton both changed task/defaults files passes clean (0 failures, 0 warnings).Test plan for reviewer
checksum:line to theget_urltask and the newplatform_package_checksumsdefault (no changes to the local-file/manual-upload path)platform_package_checksumsare unaffected (checksum isomitted, same as today)