-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: Initialize a bootloader role #71
Conversation
[citest] |
bootloader_timeout: 5 | ||
bootloader_password: null | ||
bootloader_remove_password: false | ||
bootloader_reboot_ok: true | ||
roles: | ||
- linux-system-roles.bootloader | ||
``` |
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.
We should have some examples of that show the kernel command line before running the role, and what the command line looks like after running the role will various parameters e.g.
before
args="rhgb quiet"
with parameters as above will result in
args="rhgb quiet crashkernel=auto no_timer_check debug rd.lvm.lv resume"
with parameters as above with `previous: replaced` will result in
args="quiet crashkernel=auto no_timer_check debug rd.lvm.lv resume"
most people using this role will be familiar with grubby
other tools that let you edit the kernel command line in a similar format, so having examples like that should help.
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.
WIll do
tasks/main.yml
Outdated
- name: Generate boot loader password | ||
shell: >- | ||
set -euo pipefail; | ||
( echo {{ bootloader_password }} ; echo {{ bootloader_password }} ) |
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.
( echo {{ bootloader_password }} ; echo {{ bootloader_password }} ) | |
( echo {{ bootloader_password | quote }} ; echo {{ bootloader_password | quote }} ) |
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.
and maybe there is a more secure way to do this
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.
Unfortunately, no. The usual way to do this is by running grub2-setpassword
, but it does not allow inputtng via echo:
# ( echo "12345" ; echo "12345" ) | grub2-setpassword
stty: standard input: Inappropriate ioctl for device
There is no way to input other than echo
, no env var for this or so.
[citest] |
2 similar comments
[citest] |
[citest] |
[citest] |
[citest] |
[citest] |
[citest] |
[citest] |
[citest] |
@richm can you please take a look what I am missing in unit tests? |
|
c44454b
to
0324568
Compare
[citest] |
Welcome to Codecov 🎉Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment. Thanks for integrating Codecov - We've got you covered ☂️ |
8025767
to
15d210a
Compare
[citest] |
1 similar comment
[citest] |
TODO:
|
Add bootloader_facts.py Add bootloader_settings module to configure settings instead of tasks Add unit tests for bootloader_settings and bootloader_facts
[citest] |
Enhancement: Add bootloader system role to manage bootloader configuration consistently.
Adding support for the following functionality:
Issue Tracker Tickets (Jira or BZ if any): RHELPLAN-35009