-
Notifications
You must be signed in to change notification settings - Fork 0
/
offline_repo.pp
40 lines (32 loc) · 920 Bytes
/
offline_repo.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
class offline_repo {
$sefiles = $virtual ? {
'virtualbox' => '/var/seteam-files',
default => '/opt/seteam-files',
}
file { $sefiles:
ensure => directory,
}
package { 'yum-plugin-downloadonly':
ensure => present,
}
package { 'createrepo':
ensure => present,
}
file { "${sefiles}/rpm":
ensure => directory,
}
exec { 'yum_download':
command => "/usr/bin/yum -y install tomcat6-docs-webapp tomcat6-webapps tomcat6 fontconfig dejavu-fonts-common java java-1.7.0-openjdk java-1.7.0-openjdk-devel tomcat6-admin-webapps --downloadonly --downloaddir=${sefiles}/rpms",
require => [
Package['yum-plugin-downloadonly'],
Package['createrepo'],
File["${sefiles}/rpms"],
],
returns => [ '0','1'],
}
exec { 'createrepo':
command => "/usr/bin/createrepo ${sefiles}/rpms",
require => Exec['yum_download'],
}
}
include offline_repo