64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# File 'manifests/timer.pp', line 64
define systemd::timer (
Enum['present', 'absent', 'file'] $ensure = 'present',
Stdlib::Absolutepath $path = '/etc/systemd/system',
Optional[String[1]] $timer_content = undef,
Optional[String[1]] $timer_source = undef,
Optional[String[1]] $service_content = undef,
Optional[String[1]] $service_source = undef,
String[1] $owner = 'root',
String[1] $group = 'root',
Stdlib::Filemode $mode = '0444',
Optional[Systemd::Unit] $service_unit = undef,
Boolean $show_diff = true,
Optional[Variant[Boolean, Enum['mask']]] $enable = undef,
Optional[Boolean] $active = undef,
Boolean $daemon_reload = true,
) {
assert_type(Pattern['^.+\.timer$'],$name)
if $service_content or $service_source {
$_service_unit = pick($service_unit, "${basename($name,'.timer')}.service")
systemd::unit_file { $_service_unit:
ensure => $ensure,
content => $service_content,
source => $service_source,
path => $path,
owner => $owner,
group => $group,
mode => $mode,
show_diff => $show_diff,
before => Systemd::Unit_file[$name],
daemon_reload => $daemon_reload,
}
}
systemd::unit_file { $name:
ensure => $ensure,
content => $timer_content,
source => $timer_source,
path => $path,
owner => $owner,
group => $group,
mode => $mode,
show_diff => $show_diff,
enable => $enable,
active => $active,
daemon_reload => $daemon_reload,
}
}
|