Created
September 8, 2016 14:18
-
-
Save anonymous/1cadf67b1667330b9bfb24a43e274246 to your computer and use it in GitHub Desktop.
Excerpt of grub state with multiple file.replace/managed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grubpermissions: | |
file.managed: | |
- name: {{ grub.cfg }} | |
- user: root | |
- group: root | |
- mode: 600 | |
- replace: False | |
- source: None | |
addpassword: | |
file.replace: | |
- name: {{ grub.cfg }} | |
- pattern: 'password --.*' | |
- repl: 'password --md5 {{ salt['pillar.get']('system_users:grub_md5') }}' | |
- prepend_if_not_found: True | |
addaudit: | |
file.replace: | |
- name: {{ grub.cfg }} | |
- pattern: '(\s*kernel(?!.*audit=1).*$)' | |
- repl: '\1 audit=1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment