-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.pp
35 lines (32 loc) · 874 Bytes
/
init.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class dingding {
include systemd::daemon_reload
file { "/etc/systemd/system/alertmanager-dingding.service":
source => "puppet:///modules/dingding/alertmanager-dingding.service",
ensure => file,
mode => '0644',
notify => Class['systemd::daemon_reload'],
}
file { "/etc/dingding":
ensure => directory,
mode => '0755',
purge => true,
}
file { "/etc/dingding/ding.py":
source => "puppet:///modules/dingding/ding.py",
ensure => file,
purge => true,
mode => '0700',
}
file { "/etc/dingding/ding.json":
source => "puppet:///modules/dingding/ding.json",
ensure => file,
purge => true,
mode => '0600',
}
service { 'alertmanager-dingding':
ensure => running,
hasrestart => true,
hasstatus => true,
subscribe => [Class['systemd::daemon_reload'], File['/etc/dingding/ding.json']],
}
}