/
plugin.pp
38 lines (36 loc) · 926 Bytes
/
plugin.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
# @summary Install a plugin
#
# @param package_name
# The package name to install
#
# @param config
# An optional config in the Pulp settings file
#
# @param http_content
# Optional fragment for the Apache HTTP vhost
#
# @param https_content
# Optional fragment for the Apache HTTPS vhost
define pulpcore::plugin (
String $package_name = "pulpcore-plugin(${title})",
Optional[String] $config = undef,
Optional[String] $http_content = undef,
Optional[String] $https_content = undef,
) {
package { $package_name:
ensure => present,
}
if $config {
concat::fragment { "plugin-${title}":
target => 'pulpcore settings',
content => "\n# ${title} plugin settings\n${config}",
order => '10',
}
}
if $http_content or $https_content {
pulpcore::apache::fragment { "plugin-${title}":
http_content => $http_content,
https_content => $https_content,
}
}
}