Puppet Class: cubbystack::glance::policy
- Defined in:
- manifests/glance/policy.pp
Overview
Class: cubbystack::glance::policy
Configures the policy.json file
Parameters
- settings
-
A hash of key => value settings to go in policy.json
- config_file
-
The path to policy.json Defaults to /etc/glance/policy.json
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'manifests/glance/policy.pp', line 14
class cubbystack::glance::policy (
$settings,
$config_file = '/etc/glance/policy.json',
) {
include ::cubbystack::params
## Meta settings and globals
$tags = ['openstack', 'glance', 'glance-policy']
# Make sure Glance is installed before any configuration happens
# Make sure Glance Registry is configured before the service starts
Package['glance'] -> Cubbystack_config<| tag == 'glance-policy' |>
# Restart glance after any config changes
Cubbystack_config<| tag == 'glance-policy' |> ~> Service['glance-api']
File {
ensure => present,
owner => 'glance',
group => 'glance',
mode => '0640',
tag => $tags,
notify => Service['glance-api'],
require => Package['glance'],
}
## Glance Policy configuration
file { $config_file:
content => hash2json($settings),
}
}
|