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

Change location include: linux.system.grub on kernel.sls #195

Open
madboxkr opened this issue Sep 16, 2019 · 0 comments
Open

Change location include: linux.system.grub on kernel.sls #195

madboxkr opened this issue Sep 16, 2019 · 0 comments

Comments

@madboxkr
Copy link

Hello All.

I hope you well.
When you add grub.conf, I think it have to check need or not.
So, I wish to change location of include: linux.system.grub in If condition.

Thanks.


diff --git a/linux/system/kernel.sls b/linux/system/kernel.sls
index c4d181c..868bb0c 100644
--- a/linux/system/kernel.sls
+++ b/linux/system/kernel.sls
@@ -9,10 +9,11 @@
 {%- do kernel_boot_opts.append('transparent_hugepage=' ~ system.kernel.transparent_hugepage) if system.kernel.transparent_hugepage is defined %}
 {%- do kernel_boot_opts.extend(system.kernel.boot_options) if system.kernel.boot_options is defined %}

+
+{%- if kernel_boot_opts %}
 include:
   - linux.system.grub

-{%- if kernel_boot_opts %}
 /etc/default/grub.d/99-custom-settings.cfg:
   file.managed:
     - contents: 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT {{ kernel_boot_opts|join(' ') }}"'
@madboxkr madboxkr changed the title Change location linux include grub on kernel.sls Change location include: linux.system.grub on kernel.sls Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant