-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvo_lcgdm_mappings.pp
48 lines (45 loc) · 1.31 KB
/
vo_lcgdm_mappings.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
36
37
38
39
40
41
42
43
44
45
46
47
#initialize VO LCGDM mapping resources
class vosupport::vo_lcgdm_mappings(
$configfile = "/etc/lcgdm-mkgridmap.conf",
$mapfile = "/etc/lcgdm-mapfile",
$localmapfile = "/etc/lcgdm-mapfile-local",
$logfile = "/var/log/lcgdm-mkgridmap.log"
)
{
concat{$configfile:
owner => 'root',
group => 'root',
mode => '0644',
warn => "# File managed by Puppet module vosupport",
}
concat::fragment{'lcgdmmkgridmapconf footer':
target => $configfile,
order => '99',
content => template('vosupport/lcgdm-mkgridmap.conf_footer.erb')
}
file{
"$mapfile":
ensure => present,
owner => root,
group => root,
mode => 644;
"$localmapfile":
ensure => present,
owner => root,
group => root,
mode => 644
}
# for edg-mkgridmap
package {"edg-mkgridmap":
ensure => present,
require => Class["emirepos::emirepositories"]
}
cron {"${configfile}-cron":
command => "(date; /usr/libexec/edg-mkgridmap/edg-mkgridmap.pl --conf=$configfile --output=$mapfile --safe) >> $logfile 2>&1",
environment => "PATH=/sbin:/bin:/usr/sbin:/usr/bin",
user => root,
hour => [5,11,18,23],
minute => 55,
require => [Concat[$configfile], Package['edg-mkgridmap']]
}
}