Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/swh/deploy/worker/swh_loader_git.pp
# Deployment for swh-loader-git (remote) | # Deployment for swh-loader-git (remote) | ||||
class profile::swh::deploy::worker::swh_loader_git { | class profile::swh::deploy::worker::swh_loader_git { | ||||
include ::profile::swh::deploy::base_loader_git | include ::profile::swh::deploy::base_loader_git | ||||
$concurrency = lookup('swh::deploy::worker::swh_loader_git::concurrency') | $concurrency = lookup('swh::deploy::worker::swh_loader_git::concurrency') | ||||
$loglevel = lookup('swh::deploy::worker::swh_loader_git::loglevel') | $loglevel = lookup('swh::deploy::worker::swh_loader_git::loglevel') | ||||
$task_broker = lookup('swh::deploy::worker::swh_loader_git::task_broker') | $task_broker = lookup('swh::deploy::worker::swh_loader_git::task_broker') | ||||
$config_file = '/etc/softwareheritage/loader/git-updater.yml' | $config_file = lookup('swh::deploy::worker::swh_loader_git::config_file') | ||||
$config_directory = lookup('swh::conf_directory') | |||||
$config_path = "${config_directory}/${config_file}" | |||||
$config = lookup('swh::deploy::worker::swh_loader_git::config') | $config = lookup('swh::deploy::worker::swh_loader_git::config') | ||||
$task_modules = ['swh.loader.git.tasks'] | $task_modules = ['swh.loader.git.tasks'] | ||||
$task_queues = ['swh_loader_git'] | $task_queues = ['swh_loader_git'] | ||||
::profile::swh::deploy::worker::instance {'swh_loader_git': | ::profile::swh::deploy::worker::instance {'swh_loader_git': | ||||
ensure => present, | ensure => present, | ||||
concurrency => $concurrency, | concurrency => $concurrency, | ||||
loglevel => $loglevel, | loglevel => $loglevel, | ||||
task_broker => $task_broker, | task_broker => $task_broker, | ||||
task_modules => $task_modules, | task_modules => $task_modules, | ||||
task_queues => $task_queues, | task_queues => $task_queues, | ||||
require => [ | require => [ | ||||
Class['profile::swh::deploy::base_loader_git'], | Class['profile::swh::deploy::base_loader_git'], | ||||
File[$config_file], | File[$config_path], | ||||
], | ], | ||||
} | } | ||||
file {$config_file: | file {$config_path: | ||||
ensure => 'present', | ensure => 'present', | ||||
owner => 'swhworker', | owner => 'swhworker', | ||||
group => 'swhworker', | group => 'swhworker', | ||||
mode => '0644', | mode => '0644', | ||||
content => inline_template("<%= @config.to_yaml %>\n"), | content => inline_template("<%= @config.to_yaml %>\n"), | ||||
} | } | ||||
} | } |