Skip to content

Commit 0a80900

Browse files
committed
Update instance.pp
1 parent 5ee687b commit 0a80900

File tree

1 file changed

+27
-17
lines changed

1 file changed

+27
-17
lines changed

manifests/instance.pp

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,6 @@
114114
group => $graphdb::graphdb_group,
115115
}
116116

117-
$license_file_name = basename($license)
118-
$licence_file_destination = "${instance_home_dir}/${license_file_name}"
119-
120-
file { $licence_file_destination:
121-
ensure => $ensure,
122-
source => $license,
123-
mode => '0555',
124-
notify => Service[$service_name],
125-
}
126-
127117
file { [$instance_home_dir, $instance_data_dir, $instance_plugins_dir,
128118
$instance_temp_dir, $instance_conf_dir, $instance_log_dir]:
129119
ensure => 'directory',
@@ -154,13 +144,33 @@
154144
}
155145
}
156146

157-
$default_properties = {
158-
'graphdb.home.data' => "${graphdb::data_dir}/${title}",
159-
'graphdb.home.logs' => $instance_log_dir,
160-
'graphdb.license.file' => $licence_file_destination,
161-
'graphdb.connector.port' => $http_port,
162-
'graphdb.extra.plugins' => $instance_plugins_dir,
163-
'graphdb.workbench.importDirectory' => $graphdb::import_dir,
147+
if $license {
148+
$license_file_name = basename($license)
149+
$license_file_destination = "${instance_home_dir}/${license_file_name}"
150+
151+
file { $license_file_destination:
152+
ensure => $ensure,
153+
source => $license,
154+
mode => '0555',
155+
notify => Service[$service_name],
156+
}
157+
158+
$default_properties = {
159+
'graphdb.home.data' => "${graphdb::data_dir}/${title}",
160+
'graphdb.home.logs' => $instance_log_dir,
161+
'graphdb.license.file' => $license_file_destination,
162+
'graphdb.connector.port' => $http_port,
163+
'graphdb.extra.plugins' => $instance_plugins_dir,
164+
'graphdb.workbench.importDirectory' => $graphdb::import_dir,
165+
}
166+
} else {
167+
$default_properties = {
168+
'graphdb.home.data' => "${graphdb::data_dir}/${title}",
169+
'graphdb.home.logs' => $instance_log_dir,
170+
'graphdb.connector.port' => $http_port,
171+
'graphdb.extra.plugins' => $instance_plugins_dir,
172+
'graphdb.workbench.importDirectory' => $graphdb::import_dir,
173+
}
164174
}
165175

166176
file { "${instance_home_dir}/conf/graphdb.properties":

0 commit comments

Comments
 (0)