trying to make sure my grub conf file contains a string,

cat /etc/default/grub

GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
*GRUB_CMDLINE_LINUX="crashkernel=auto audit=1 rd.lvm.lv=rhel/root 
rd.lvm.lv=rhel/swap rhgb quiet"*
GRUB_DISABLE_RECOVERY="true"

my manifest has this,


$file = '/etc/default/grub'

file_line { "(5.2.3) - ${file}: audit=1":
 ensure    => present,
 path      => $file,
 line      => 'audit=1',
 match     => *'^GRUB_CMDLINE_LINUX=".*audit=1.*$*',
}

I used Rubular regex editor and the regex works in rubular, it should match 
the line and pass, since hte line contains "audit=1", but during puppet 
run, it throws an exception,

/Stage[main]/Cis_rhel7::Rule::Rule_5_2_3/File_line[(5.2.3) - 
/etc/default/grub: audit=1]/ensure: current_value absent, should be present 
(noop)

Cant figure out why its not matching. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e1f77ab6-f07a-4ef8-871c-c7592da1a818%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to