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

correct clevis askpass unit conditional #81

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tasks/main-clevis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
name: "{{ __nbde_client_packages }}"
state: present

- name: Get services
service_facts:

- name: Enable clevis askpass unit
service:
name: clevis-luks-askpass.path
enabled: yes
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
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Member

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.


- name: Generate nbde_client dracut config
template:
Expand Down