Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/swh/deploy/indexer_journal_client.pp
Show All 12 Lines | class profile::swh::deploy::indexer_journal_client { | ||||
$service_name = 'swh-indexer-journal-client' | $service_name = 'swh-indexer-journal-client' | ||||
$unit_name = "${service_name}.service" | $unit_name = "${service_name}.service" | ||||
file {$config_path: | file {$config_path: | ||||
ensure => present, | ensure => present, | ||||
owner => 'root', | owner => 'root', | ||||
group => 'swhdev', | group => 'swhdev', | ||||
mode => '0644', | mode => '0640', | ||||
content => inline_template("<%= @config.to_yaml %>\n"), | content => inline_template("<%= @config.to_yaml %>\n"), | ||||
notify => Service[$service_name], | notify => Service[$service_name], | ||||
} | } | ||||
# Template uses variables | # Template uses variables | ||||
# - $user | # - $user | ||||
# - $group | # - $group | ||||
# | # | ||||
::systemd::unit_file {$unit_name: | ::systemd::unit_file {$unit_name: | ||||
ensure => present, | ensure => present, | ||||
content => template("profile/swh/deploy/journal/${unit_name}.erb"), | content => template("profile/swh/deploy/journal/${unit_name}.erb"), | ||||
} ~> service {$service_name: | } ~> service {$service_name: | ||||
ensure => running, | ensure => running, | ||||
enable => true, | enable => true, | ||||
} | } | ||||
} | } |