Skip to content

Instantly share code, notes, and snippets.

@VinceMacBuche
Created December 31, 2018 15:42
Show Gist options
  • Save VinceMacBuche/b468a82b46fb38d22580eb1b9ef1dd6d to your computer and use it in GitHub Desktop.
Save VinceMacBuche/b468a82b46fb38d22580eb1b9ef1dd6d to your computer and use it in GitHub Desktop.
enforce_file_content mgmt
class file_enforce_content($file_name str, $file_content str, $audit_mode bool) {
file $file_name {
content => $file_content
, state => "exists"
, meta =>
struct{
noop => $audit_mode,
}
,
}
print "report ${file_name}" {
msg => "Fixed file ${file_name}",
Depend => File[$file_name],
}
6,5 Top
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment