Puppet Class: slothslos::report2drive
- Defined in:
- modules/slothslos/manifests/report2drive.pp
Summary
Overview
SPDX-License-Identifier: Apache-2.0
Class: slothslos::report2drive
Manage the report2drive runtime files and system user used by the
reporting helper script.
This class ensures a system user exists for running the report2drive
helper, creates the configuration directory at /etc/report2drive, and
deploys the report2drive executable to /usr/local/bin. It accepts a
user parameter to control ownership and a flexible ensure parameter to
allow removal or creation of the managed resources.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'modules/slothslos/manifests/report2drive.pp', line 22
class slothslos::report2drive (
String $user = 'report2drive',
Optional[Wmflib::Ensure] $ensure = present,
) {
stdlib::ensure_packages(['python3-google-auth', 'python3-googleapi', 'python3-wmflib', 'python3-click', 'python3-dateutil'])
systemd::sysuser { $user: }
file { '/etc/report2drive':
ensure => stdlib::ensure($ensure, 'directory'),
owner => $user,
group => $user,
mode => '0755',
require => Systemd::Sysuser[$user],
}
file { '/usr/local/bin/report2drive':
ensure => stdlib::ensure($ensure, 'file'),
mode => '0550',
owner => $user,
source => 'puppet:///modules/slothslos/report2drive.py',
}
}
|