Initial Chef repository

This commit is contained in:
Greg Karékinian
2015-07-21 19:45:23 +02:00
parent 7e5401fc71
commit ee4079fa85
1151 changed files with 185163 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
module SMFManifest
# Helper methods for determining whether work needs to be done
# with respect to assigning RBAC values to a service.
class RBACHelper < SMFManifest::Helper
include Chef::Mixin::ShellOut
def authorization_set?
current_authorization == authorization
end
def value_authorization_set?
current_value_authorization == value_authorization
end
def current_authorization
shell_out("svcprop -p general/action_authorization #{resource.name}").stdout.chomp
end
def current_value_authorization
shell_out("svcprop -p general/value_authorization #{resource.name}").stdout.chomp
end
def authorization
"solaris.smf.manage.#{resource.authorization_name}"
end
def value_authorization
"solaris.smf.value.#{resource.authorization_name}"
end
end
end