diff --git a/manifests/swh/deploy/objstorage_archive_notifier_checker.pp b/manifests/swh/deploy/objstorage_archive_notifier_checker.pp index a33ba34..324052e 100644 --- a/manifests/swh/deploy/objstorage_archive_notifier_checker.pp +++ b/manifests/swh/deploy/objstorage_archive_notifier_checker.pp @@ -1,59 +1,49 @@ # Deployment of the swh.objstorage.checker.ArchiveNotifierContentChecker class profile::swh::deploy::objstorage_archive_notifier_checker { $conf_directory = hiera('swh::deploy::objstorage_archive_notifier_checker::conf_directory') $conf_file = hiera('swh::deploy::objstorage_archive_notifier_checker::conf_file') $user = hiera('swh::deploy::objstorage_archive_notifier_checker::user') $group = hiera('swh::deploy::objstorage_archive_notifier_checker::group') # configuration file - $directory = hiera('swh::deploy::objstorage_archive_notifier_checker::directory') - $slicing = hiera('swh::deploy::objstorage_archive_notifier_checker::slicing') - $checker_class = hiera('swh::deploy::objstorage_archive_notifier_checker::class') - $batch_size = hiera('swh::deploy::objstorage_archive_notifier_checker::batch_size') - $log_tag = hiera('swh::deploy::objstorage_archive_notifier_checker::log_tag') - $storage_name = hiera('swh::deploy::objstorage_archive_notifier_checker::storage_name') - - $db_host = hiera('swh::deploy::objstorage_archive_notifier_checker::db::host') - $db_dbname = hiera('swh::deploy::objstorage_archive_notifier_checker::db::dbname') - $db_user = hiera('swh::deploy::objstorage_archive_notifier_checker::db::user') - $db_password = hiera('swh::deploy::objstorage_archive_notifier_checker::db::password') + $archive_notifier_config = hiera('swh::deploy::objstorage_archive_notifier_checker::config') $swh_packages = ['python3-swh.objstorage.checker'] package {$swh_packages: ensure => latest, require => Apt::Source['softwareheritage'], } file {$conf_directory: ensure => directory, owner => 'root', group => $group, mode => '0750', } file {$conf_file: ensure => present, owner => 'root', group => $group, mode => '0640', - content => template('profile/swh/deploy/storage/objstorage_archive_notifier_checker.yml.erb'), + content => inline_template('<%= @archive_notifier_config.to_yaml %>'), } include ::systemd file {'/etc/systemd/system/objstorage_archive_notifier_checker.service': ensure => present, owner => 'root', group => 'root', mode => '0644', content => template('profile/swh/deploy/storage/objstorage_archive_notifier_checker.service.erb'), notify => Exec['systemd-daemon-reload'], require => [ File[$conf_file], Package[$swh_packages], ] } } diff --git a/templates/swh/deploy/storage/objstorage_archive_notifier_checker.yml.erb b/templates/swh/deploy/storage/objstorage_archive_notifier_checker.yml.erb deleted file mode 100644 index 85278f1..0000000 --- a/templates/swh/deploy/storage/objstorage_archive_notifier_checker.yml.erb +++ /dev/null @@ -1,13 +0,0 @@ -# swh.objstorage.checker.ArchiveNotifierContentChecker configuration file -# File managed by puppet - modifications will be overwritten - -storage: - cls: <%= @checker_class %> - args: - root: <%= @directory %> - slicing: <%= @slicing %> - -batch_size: <%= @batch_size %> -log_tag: <%= @log_tag %> -storage_name: <%= @storage_name %> -dbconn: host=<%= @db_host %> dbname=<%= @db_dbname %> user=<%= @db_user %> password=<%= @db_password %>