Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/export_archive_counters.pp
# stats_export master class | # stats_export master class | ||||
class profile::export_archive_counters { | class profile::export_archive_counters { | ||||
$export_path = lookup('stats_export::export_path') | $export_path = lookup('stats_export::export_path') | ||||
$export_file = lookup('stats_export::export_file') | $export_file = lookup('stats_export::export_file') | ||||
$packages = ['python3-click'] | $packages = ['python3-click', 'python3-requests'] | ||||
package {$packages: | package {$packages: | ||||
ensure => present, | ensure => present, | ||||
} | } | ||||
$script_name = 'export_archive_counters.py' | $script_name = 'export_archive_counters.py' | ||||
$script_path = "/usr/local/bin/${script_name}" | $script_path = "/usr/local/bin/${script_name}" | ||||
file {$script_path: | file {$script_path: | ||||
ensure => present, | ensure => present, | ||||
owner => 'root', | owner => 'root', | ||||
group => 'root', | group => 'root', | ||||
mode => '0755', | mode => '0755', | ||||
source => "puppet:///modules/profile/stats_exporter/${script_name}", | source => "puppet:///modules/profile/stats_exporter/${script_name}", | ||||
require => Package[$packages], | require => Package[$packages], | ||||
} | } | ||||
$history_data_name = 'history-counters.munin.json' | $history_data_name = 'history-counters.munin.json' | ||||
vlorentz: Is this the right place for a data file? (although it's immutable) | |||||
Done Inline Actionsi did not think this through, i kept the original value. ardumont: i did not think this through, i kept the original value.
What you say makes sense but i don't… | |||||
$history_data_path = "/usr/local/share/swh-data/${history_data_name}" | $history_data_path = "/usr/local/share/swh-data/${history_data_name}" | ||||
file {$history_data_path: | file {$history_data_path: | ||||
ensure => present, | ensure => present, | ||||
owner => 'root', | owner => 'root', | ||||
group => 'root', | group => 'root', | ||||
mode => '0644', | mode => '0644', | ||||
source => "puppet:///modules/profile/stats_exporter/${history_data_name}", | source => "puppet:///modules/profile/stats_exporter/${history_data_name}", | ||||
} | } | ||||
Show All 20 Lines |
Is this the right place for a data file? (although it's immutable)