Skip to content

Instantly share code, notes, and snippets.

@ssplatt
Last active August 15, 2016 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssplatt/7336d12c641180c850d0509e7118e004 to your computer and use it in GitHub Desktop.
Save ssplatt/7336d12c641180c850d0509e7118e004 to your computer and use it in GitHub Desktop.
update-grub example
{%- from "grub/map.jinja" import grub with context %}
grub_default_config:
file.managed:
- name: '/etc/default/grub'
- source: salt://grub/files/default_grub.j2
- user: root
- group : root
- mode: 0644
- template: jinja
{% if grub.do_update %}
grub_update_config:
cmd.wait:
- name: update-grub
- watch:
- file: grub_default_config
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment