solar/resources/nova_compute_libvirt_puppet/actions/run.pp
Bogdan Dobrelya 41433b26db Add nova comp libvirt resource
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2015-08-03 16:38:39 +02:00

57 lines
2.9 KiB
Puppet

$resource = hiera($::resource_name)
$libvirt_virt_type = $resource['input']['libvirt_virt_type']['value']
$vncserver_listen = $resource['input']['vncserver_listen']['value']
$migration_support = $resource['input']['migration_support']['value']
$libvirt_cpu_mode = $resource['input']['libvirt_cpu_mode']['value']
$libvirt_disk_cachemodes = $resource['input']['libvirt_disk_cachemodes']['value']
$libvirt_inject_password = $resource['input']['libvirt_inject_password']['value']
$libvirt_inject_key = $resource['input']['libvirt_inject_key']['value']
$libvirt_inject_partition = $resource['input']['libvirt_inject_partition']['value']
$remove_unused_base_images = $resource['input']['remove_unused_base_images']['value']
$remove_unused_kernels = $resource['input']['remove_unused_kernels']['value']
$remove_unused_resized_minimum_age_seconds = $resource['input']['remove_unused_resized_minimum_age_seconds']['value']
$remove_unused_original_minimum_age_seconds = $resource['input']['remove_unused_original_minimum_age_seconds']['value']
$libvirt_service_name = $resource['input']['libvirt_service_name']['value']
$libvirt_type = $resource['input']['libvirt_type']['value']
class { 'nova::compute::libvirt':
libvirt_virt_type => $libvirt_virt_type,
vncserver_listen => $vncserver_listen,
migration_support => $migration_support,
libvirt_cpu_mode => $libvirt_cpu_mode,
libvirt_disk_cachemodes => $libvirt_disk_cachemodes,
libvirt_inject_password => $libvirt_inject_password,
libvirt_inject_key => $libvirt_inject_key,
libvirt_inject_partition => $libvirt_inject_partition,
remove_unused_base_images => $remove_unused_base_images,
remove_unused_kernels => $remove_unused_kernels,
remove_unused_resized_minimum_age_seconds => $remove_unused_resized_minimum_age_seconds,
remove_unused_original_minimum_age_seconds => $remove_unused_original_minimum_age_seconds,
libvirt_service_name => $libvirt_service_name,
libvirt_type => $libvirt_type,
}
#exec { 'networking-refresh':
# command => '/sbin/ifdown -a ; /sbin/ifup -a',
#}
#exec { 'post-nova_config':
# command => '/bin/echo "Nova config has changed"',
#}
include nova::params
service { 'nova-compute':
name => $::nova::params::compute_service_name,
}
package { 'nova-compute':
name => $::nova::params::compute_package_name,
}
package { 'nova-common':
name => $nova::params::common_package_name,
ensure => $ensure_package,
}