Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/swh/deploy/worker/swh_lister_github.pp
# Deployment for swh-lister-github | # Deployment for swh-lister-github | ||||
class profile::swh::deploy::worker::swh_lister_github { | class profile::swh::deploy::worker::swh_lister_github { | ||||
$concurrency = lookup('swh::deploy::worker::swh_lister_github::concurrency') | $concurrency = lookup('swh::deploy::worker::swh_lister_github::concurrency') | ||||
$loglevel = lookup('swh::deploy::worker::swh_lister_github::loglevel') | $loglevel = lookup('swh::deploy::worker::swh_lister_github::loglevel') | ||||
$task_broker = lookup('swh::deploy::worker::swh_lister_github::task_broker') | |||||
$config_file = lookup('swh::deploy::worker::swh_lister_github::config_file') | $config_file = lookup('swh::deploy::worker::swh_lister_github::config_file') | ||||
$config = lookup('swh::deploy::worker::swh_lister_github::config', Hash, 'deep') | $config = lookup('swh::deploy::worker::swh_lister_github::config', Hash, 'deep') | ||||
$task_modules = ['swh.lister.github.tasks'] | |||||
$task_queues = ['swh_lister_github_discover', 'swh_lister_github_refresh'] | |||||
include ::profile::swh::deploy::base_lister | include ::profile::swh::deploy::base_lister | ||||
::profile::swh::deploy::worker::instance {'lister_github': | ::profile::swh::deploy::worker::instance {'lister_github': | ||||
ensure => present, | ensure => present, | ||||
concurrency => $concurrency, | concurrency => $concurrency, | ||||
loglevel => $loglevel, | loglevel => $loglevel, | ||||
task_broker => $task_broker, | |||||
task_modules => $task_modules, | |||||
task_queues => $task_queues, | |||||
require => [ | require => [ | ||||
Package['python3-swh.lister'], | Package['python3-swh.lister'], | ||||
File[$config_file], | File[$config_file], | ||||
], | ], | ||||
} | } | ||||
# Contains passwords | # Contains passwords | ||||
file {$config_file: | file {$config_file: | ||||
ensure => 'present', | ensure => 'present', | ||||
owner => 'swhworker', | owner => 'swhworker', | ||||
group => 'swhdev', | group => 'swhdev', | ||||
mode => '0640', | mode => '0640', | ||||
content => inline_template("<%= @config.to_yaml %>\n"), | content => inline_template("<%= @config.to_yaml %>\n"), | ||||
} | } | ||||
} | } |