Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
puppetdb_ssl_dir is added as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ltutar authored and egeland committed Feb 2, 2017
1 parent 92ecc11 commit 71a1d6f
Showing 1 changed file with 33 additions and 16 deletions.
49 changes: 33 additions & 16 deletions manifests/config/resource_source.pp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
$use_default_mapping = true,
$puppet_enterprise_host = '',
$puppet_enterprise_port = '',
$puppet_enterprise_ssl_dir = '',
$puppet_enterprise_mapping_file = '',
$puppet_enterprise_metrics_interval = '',
) {
Expand Down Expand Up @@ -325,15 +326,17 @@
'puppet-enterprise': {
validate_string($puppet_enterprise_host)
validate_integer($puppet_enterprise_port)
validate_integer($puppet_enterprise_metrics_interval)
validate_absolute_path($puppet_enterprise_mapping_file)
ini_setting { "${name}::resources.source.${number}.config.PROPERTY_MAPPING_FILE":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.PROPERTY_MAPPING_FILE",
value => $puppet_enterprise_mapping_file,
require => File[$properties_file],

if ( $puppet_enterprise_mapping_file != '') {
validate_absolute_path($puppet_enterprise_mapping_file)
ini_setting { "${name}::resources.source.${number}.config.PROPERTY_MAPPING_FILE":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.PROPERTY_MAPPING_FILE",
value => $puppet_enterprise_mapping_file,
require => File[$properties_file],
}
}
ini_setting { "${name}::resources.source.${number}.config.PROPERTY_PUPPETDB_HOST":
ensure => present,
Expand All @@ -343,13 +346,16 @@
value => $puppet_enterprise_host,
require => File[$properties_file],
}
ini_setting { "${name}::resources.source.${number}.config.PROPERTY_METRICS_INTERVAL":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.PROPERTY_METRICS_INTERVAL",
value => $puppet_enterprise_metrics_interval,
require => File[$properties_file],
if ( $puppet_enterprise_metrics_interval != '') {
validate_integer($puppet_enterprise_metrics_interval)
ini_setting { "${name}::resources.source.${number}.config.PROPERTY_METRICS_INTERVAL":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.PROPERTY_METRICS_INTERVAL",
value => $puppet_enterprise_metrics_interval,
require => File[$properties_file],
}
}
ini_setting { "${name}::resources.source.${number}.config.PROPERTY_PUPPETDB_PORT":
ensure => present,
Expand All @@ -359,6 +365,17 @@
value => $puppet_enterprise_port,
require => File[$properties_file],
}
if ( $puppet_enterprise_ssl_dir != '') {
validate_absolute_path($puppet_enterprise_ssl_dir)
ini_setting { "${name}::resources.source.${number}.config.PROPERTY_PUPPETDB_SSL_DIR":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.PROPERTY_PUPPETDB_SSL_DIR",
value => $puppet_enterprise_ssl_dir,
require => File[$properties_file],
}
}
}
default: {
err("The rundeck resource model source_type ${source_type} is not supported")
Expand Down

0 comments on commit 71a1d6f

Please sign in to comment.