-
Notifications
You must be signed in to change notification settings - Fork 24
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
correct clevis askpass unit conditional #81
correct clevis askpass unit conditional #81
Conversation
when: ansible_distribution != "RedHat" or | ||
(not ansible_distribution_version is version("8.2", "==") and | ||
not ansible_distribution_version is version("8.3", "==")) | ||
when: ansible_facts.services['clevis-luks-askpass.service'] is defined |
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.
@sergio-correia is this service created when you install the clevis
RPM packages? If so, then this looks correct.
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.
According to dnf
the service is provided by clevis-systemd
.
[root@mt-test01 ~]# dnf whatprovides "/usr/*/clevis-luks-askpass*"
Updating Subscription Management repositories.
Last metadata expiration check: 0:09:53 ago on Fri 30 Sep 2022 08:16:08 PM UTC.
clevis-systemd-11-2.el8.x86_64 : systemd integration for clevis
Repo : rhel-8-for-x86_64-appstream-rpms
Matched from:
Filename : /usr/lib/systemd/system/clevis-luks-askpass.path
Filename : /usr/lib/systemd/system/clevis-luks-askpass.service
Filename : /usr/libexec/clevis-luks-askpass
clevis-systemd-11-9.el8.x86_64 : systemd integration for clevis
Repo : rhel-8-for-x86_64-appstream-rpms
Matched from:
Filename : /usr/lib/systemd/system/[email protected]
Filename : /usr/lib/systemd/system/[email protected]
Filename : /usr/libexec/clevis-luks-askpass
...
clevis-systemd-15-8.el8.x86_64 : systemd integration for clevis
Repo : rhel-8-for-x86_64-appstream-rpms
Matched from:
Filename : /usr/lib/systemd/system/clevis-luks-askpass.path
Filename : /usr/lib/systemd/system/clevis-luks-askpass.service
Filename : /usr/libexec/clevis-luks-askpass
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.
@sergio-correia is this service created when you install the
clevis
RPM packages? If so, then this looks correct.
Yeah, it's installed by the clevis-systemd
package. And I agree it looks correct.
[citest] |
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.
Thanks, this looks good to me.
[1.2.7] - 2022-11-01 -------------------- ### New Features - none ### Bug Fixes - correct clevis askpass unit conditional (linux-system-roles#81) - Add default clevis luks askpass unit (linux-system-roles#79) skip clevis askpass systemd unit for RHEL 8.2 and 8.3 - use no_log: true where secrets might be revealed ### Other Changes - fix test tmp files (linux-system-roles#80) tests - use generated temp directory for all controller files If you run multiple tests in parallel, some of the tests could overwrite or remove files in use by other tests on the controller. Use a temp directory for controller files. - test support for CentOS Stream 9 Signed-off-by: Rich Megginson <[email protected]>
[1.2.7] - 2022-11-01 -------------------- ### New Features - none ### Bug Fixes - correct clevis askpass unit conditional (#81) - Add default clevis luks askpass unit (#79) skip clevis askpass systemd unit for RHEL 8.2 and 8.3 - use no_log: true where secrets might be revealed ### Other Changes - fix test tmp files (#80) tests - use generated temp directory for all controller files If you run multiple tests in parallel, some of the tests could overwrite or remove files in use by other tests on the controller. Use a temp directory for controller files. - test support for CentOS Stream 9 Signed-off-by: Rich Megginson <[email protected]> Signed-off-by: Rich Megginson <[email protected]>
A bug was introduced in PR Add default clevis luks askpass unit #79 which silently fails to configure the clevis askpass unit correctly on RHEL 8.2 and 8.3 with certain versions of the
clevis-systemd
package installed. This PR fixes it by changing the conditional such that if theclevis-luks-askpass.path
service exists, it is enabled. If it doesn't exist, then a version ofclevis-systemd
that uses templated units is installed, and the unit will be enabled bydracut
. Tests have been successful with templated, and staticclevis-luks-askpass.path
units.