Created
August 6, 2015 21:27
-
-
Save dustinmm80/50afe46e614e01cbd4c7 to your computer and use it in GitHub Desktop.
host-factory in policy
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
policy 'tomcat_policy' do | |
security_admin_group = group '/security_admin' | |
devops_group = group 'devops' | |
tomcat_hosts_layer = layer 'tomcat_hosts' | |
tomcat_factory = host_factory 'tomcat_factory', | |
:layers => [tomcat_hosts_layer], | |
:roleid => security_admin_group.roleid | |
tomcat_hosts_layer.role.grant_to tomcat_factory, :admin_option => true | |
tomcat_variables = [ | |
variable('database_password'), | |
variable('api_key') | |
] | |
tomcat_variables.each do |v| | |
v.permit 'read', devops_group | |
v.permit 'execute', devops_group | |
v.permit 'update', devops_group | |
v.permit 'execute', tomcat_hosts_layer | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment