diff --git a/manifests/swh/deploy/objstorage_repair_checker.pp b/manifests/swh/deploy/objstorage_repair_checker.pp index 13d7f47..a907fcc 100644 --- a/manifests/swh/deploy/objstorage_repair_checker.pp +++ b/manifests/swh/deploy/objstorage_repair_checker.pp @@ -1,53 +1,48 @@ # Deployment of the swh.objstorage.checker.RepairContentChecker class profile::swh::deploy::objstorage_repair_checker { $conf_directory = hiera('swh::deploy::objstorage_repair_checker::conf_directory') $conf_file = hiera('swh::deploy::objstorage_repair_checker::conf_file') $user = hiera('swh::deploy::objstorage_repair_checker::user') $group = hiera('swh::deploy::objstorage_repair_checker::group') - # configuration file - $directory = hiera('swh::deploy::objstorage_repair_checker::directory') - $slicing = hiera('swh::deploy::objstorage_repair_checker::slicing') - $checker_class = hiera('swh::deploy::objstorage_repair_checker::class') - $batch_size = hiera('swh::deploy::objstorage_repair_checker::batch_size') - $log_tag = hiera('swh::deploy::objstorage_repair_checker::log_tag') + $repair_checker_config = hiera('swh::deploy::objstorage_repair_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_repair_checker.yml.erb'), + content => inline_template('<%= @repair_checker_config.to_yaml %>'), } include ::systemd file {'/etc/systemd/system/objstorage_repair_checker.service': ensure => present, owner => 'root', group => 'root', mode => '0644', content => template('profile/swh/deploy/storage/objstorage_repair_checker.service.erb'), notify => Exec['systemd-daemon-reload'], require => [ File[$conf_file], Package[$swh_packages], ] } } diff --git a/templates/swh/deploy/storage/objstorage_repair_checker.yml.erb b/templates/swh/deploy/storage/objstorage_repair_checker.yml.erb deleted file mode 100644 index 3118fd1..0000000 --- a/templates/swh/deploy/storage/objstorage_repair_checker.yml.erb +++ /dev/null @@ -1,20 +0,0 @@ -# swh.objstorage.checker.RepairContentChecker 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 %> -backup_storages: - banco: - cls: remote - args: - base_url: http://banco:5003/ - uffizi: - cls: remote - args: - base_url: http://uffizi:5002/