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

Added mokutil check to detect SecureBoot status before installing #5879

Merged
merged 2 commits into from
Mar 30, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,26 @@
https://github.com/freedomofpress/securedrop/issues/4058

- name: Install python and packages required by installer
raw: apt install -y python3 apt-transport-https dnsutils ubuntu-release-upgrader-core
raw: apt install -y python3 apt-transport-https dnsutils ubuntu-release-upgrader-core mokutil
register: _apt_install_prereqs_results
changed_when: "'0 upgraded, 0 newly installed, 0 to remove' not in _apt_install_prereqs_results.stdout"

- name: Check SecureBoot status
command: mokutil --sb-state
changed_when: false
failed_when: false # results inspected below
register: _mokutil_results

- name: Verify that SecureBoot is not enabled
assert:
that:
- "'SecureBoot enabled' not in _mokutil_results.stdout"
- "'SecureBoot enabled' not in _mokutil_results.stderr"
fail_msg: >-
SecureBoot is enabled. SecureDrop cannot be installed, as it uses a
custom kernel that is not signed. Please disable SecureBoot on the
target servers and try again.

- name: Remove cloud-init
apt:
name: cloud-init
Expand Down