45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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/init.pp', line 45
class artifactory (
Boolean $manage_repo = true,
Enum['oss','pro'] $edition = 'oss',
String[1] $package_name = "jfrog-artifactory-${edition}",
String[1] $package_version = 'installed',
Enum[
'derby',
'mariadb',
'mssql',
'mysql',
'oracle',
'postgresql'
] $db_type = 'postgresql',
Boolean $manage_db = true,
Stdlib::Host $db_host = 'localhost',
String[1] $db_name = 'artifactory',
String[1] $db_user = 'artifactory',
Stdlib::Port $db_port = 5432,
Variant[
Sensitive[String[1]],
String[1]
] $db_password = extlib::cache_data('artifactory', 'db_password', extlib::random_password(16)),
Optional[String[1]] $db_url = undef,
Hash $additional_system_config = {},
Optional[Integer] $uid = undef,
Optional[Integer] $gid = $uid,
Optional[
Variant[
Sensitive[Pattern[/\A(\h{32}|\h{64})\z/]],
Pattern[/\A(\h{32}|\h{64})\z/]
]
] $master_key = undef,
Optional[String[1]] $binary_store_config_xml = undef,
String[1] $jvm_max_heap_size = '2G',
String[1] $jvm_min_heap_size = $jvm_max_heap_size,
Array[String[1]] $jvm_extra_args = [],
Hash $system_properties = {},
) {
if $manage_repo {
contain artifactory::repo
Class['artifactory::repo'] -> Class['artifactory::install']
}
if $manage_db {
unless $db_type == 'postgresql' { fail('Only postgresql is supported when `manage_db` is `true`') }
contain artifactory::db
Class['artifactory::db'] -> Class['artifactory::service']
}
if $uid and $gid {
contain artifactory::user
Class['artifactory::user'] -> Class['artifactory::install']
}
contain artifactory::install
contain artifactory::config
contain artifactory::service
Class['artifactory::install']
-> Class['artifactory::config']
~> Class['artifactory::service']
}
|