solar-resources/resources/nova_generic_service_puppet/1.0.0/actions/update.pp
Jedrzej Nowak 1b28b8f3c4 Change resources structure to match repository one
Change-Id: Ie8d8c092e64890af2f0886303ef3f16752ba5b76
2015-12-18 18:01:20 +01:00

30 lines
761 B
Puppet

$resource = hiera($::resource_name)
$service_title = $resource['input']['title']
$package_name = $resource['input']['package_name']
$service_name = $resource['input']['service_name']
$ensure_package = $resource['input']['ensure_package']
exec { 'post-nova_config':
command => '/bin/echo "Nova config has changed"',
}
include nova::params
package { 'nova-common':
name => $nova::params::common_package_name,
ensure => $ensure_package,
}
nova::generic_service { $service_title:
enabled => true,
manage_service => true,
package_name => $package_name,
service_name => $service_name,
ensure_package => $ensure_package,
}
notify { "restart generic service":
notify => Service["nova-${service_title}"],
}