Skip to content

Instantly share code, notes, and snippets.

@VinceMacBuche
Created December 31, 2018 16:17
Show Gist options
  • Save VinceMacBuche/c61e3454a59d82a9e3868b49f41e28db to your computer and use it in GitHub Desktop.
Save VinceMacBuche/c61e3454a59d82a9e3868b49f41e28db to your computer and use it in GitHub Desktop.
class file_enforce_content($file_name str, $file_content str) {
file $file_name {
content => $file_content
, state => "exists"
,
}
print "report ${file_name}" {
msg => "Fixed file ${file_name}",
Depend => File[$file_name],
}
}
import "technique.mcl" as *
include technique("uuid1","uuid2", false)
import "file_methods.mcl" as *
class technique ($directive_id str, $rule_id str, $audit_mode bool) {
include file_enforce_content("/tmp/test","Hello!!!")
include file_enforce_content("/tmp/test2","Hello2!!!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment