diff --git a/manifests/cache/cleaner.pp b/manifests/cache/cleaner.pp index 64a70d08..d9ae4cad 100644 --- a/manifests/cache/cleaner.pp +++ b/manifests/cache/cleaner.pp @@ -39,7 +39,7 @@ class glance::cache::cleaner( cron { 'glance-cache-cleaner': command => "${glance::params::cache_cleaner_command} ${command_options}", environment => 'PATH=/bin:/usr/bin:/usr/sbin', - user => 'glance', + user => $::glance::params::user, minute => $minute, hour => $hour, monthday => $monthday, diff --git a/manifests/cache/pruner.pp b/manifests/cache/pruner.pp index 7766c707..ed9338f3 100644 --- a/manifests/cache/pruner.pp +++ b/manifests/cache/pruner.pp @@ -39,7 +39,7 @@ class glance::cache::pruner( cron { 'glance-cache-pruner': command => "${glance::params::cache_pruner_command} ${command_options}", environment => 'PATH=/bin:/usr/bin:/usr/sbin', - user => 'glance', + user => $::glance::params::user, minute => $minute, hour => $hour, monthday => $monthday, diff --git a/manifests/cron/db_purge.pp b/manifests/cron/db_purge.pp index c1526cb2..058c685e 100644 --- a/manifests/cron/db_purge.pp +++ b/manifests/cron/db_purge.pp @@ -36,7 +36,7 @@ # # [*user*] # (optional) User with access to glance files. -# Defaults to 'glance'. +# Defaults to $::glance::params::user. # # [*age*] # (optional) Number of days prior to today for deletion, @@ -64,12 +64,12 @@ class glance::cron::db_purge ( $monthday = '*', $month = '*', $weekday = '*', - $user = 'glance', + $user = $::glance::params::user, $age = 30, $max_rows = 100, $destination = '/var/log/glance/glance-rowsflush.log', $maxdelay = 0 -) { +) inherits glance::params { include glance::deps diff --git a/manifests/cron/db_purge_images_table.pp b/manifests/cron/db_purge_images_table.pp index 00df3c79..c1da5d97 100644 --- a/manifests/cron/db_purge_images_table.pp +++ b/manifests/cron/db_purge_images_table.pp @@ -36,7 +36,7 @@ # # [*user*] # (optional) User with access to glance files. -# Defaults to 'glance'. +# Defaults to $::glance::params::user. # # [*age*] # (optional) Number of days prior to today for deletion, @@ -64,12 +64,12 @@ class glance::cron::db_purge_images_table ( $monthday = '*', $month = '*', $weekday = '*', - $user = 'glance', + $user = $::glance::params::user, $age = 30, $max_rows = 100, $destination = '/var/log/glance/glance-images-rowsflush.log', $maxdelay = 0 -) { +) inherits glance::params { include glance::deps diff --git a/manifests/db/metadefs.pp b/manifests/db/metadefs.pp index 0d29c65b..816dfd66 100644 --- a/manifests/db/metadefs.pp +++ b/manifests/db/metadefs.pp @@ -19,7 +19,7 @@ class glance::db::metadefs( exec { 'glance-manage db_load_metadefs': command => "glance-manage ${extra_params} db_load_metadefs", path => '/usr/bin', - user => 'glance', + user => $::glance::params::user, refreshonly => true, try_sleep => 5, tries => 10, diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index f320e7cb..4185e015 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -19,11 +19,12 @@ class glance::db::sync( ) { include glance::deps + include glance::params exec { 'glance-manage db_sync': command => "glance-manage ${extra_params} db_sync", path => '/usr/bin', - user => 'glance', + user => $::glance::params::user, refreshonly => true, try_sleep => 5, tries => 10, diff --git a/manifests/params.pp b/manifests/params.pp index 319b56b9..95030148 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -7,6 +7,7 @@ class glance::params { $cache_cleaner_command = 'glance-cache-cleaner' $cache_pruner_command = 'glance-cache-pruner' + $user = 'glance' $group = 'glance' $boto3_package_name = 'python3-boto3'