diff --git a/manifests/init.pp b/manifests/init.pp index a04e8d2..91e5283 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -168,7 +168,7 @@ class puppetdb( puppetdb_service => $puppetdb_service, manage_redhat_firewall => $manage_redhat_firewall, confdir => $confdir, - java_args => $java_args, + java_args => $java_args, } if ($database == 'postgres') { diff --git a/manifests/master/config.pp b/manifests/master/config.pp index 531caa1..9d20304 100644 --- a/manifests/master/config.pp +++ b/manifests/master/config.pp @@ -82,20 +82,20 @@ class puppetdb::master::config( } if ($strict_validation) { - # Validate the puppetdb connection. If we can't connect to puppetdb then we - # *must* not perform the other configuration steps, or else - puppetdb_conn_validator { 'puppetdb_conn': - puppetdb_server => $manage_config ? { true => $puppetdb_server, default => undef }, - puppetdb_port => $manage_config ? { true => $puppetdb_port, default => undef }, - timeout => $puppetdb_startup_timeout, - require => Package[$terminus_package], - } + # Validate the puppetdb connection. If we can't connect to puppetdb then we + # *must* not perform the other configuration steps, or else + puppetdb_conn_validator { 'puppetdb_conn': + puppetdb_server => $manage_config ? { true => $puppetdb_server, default => undef }, + puppetdb_port => $manage_config ? { true => $puppetdb_port, default => undef }, + timeout => $puppetdb_startup_timeout, + require => Package[$terminus_package], + } - # This is a bit of puppet chicanery that allows us to create a - # conditional dependency. Basically, we're saying that "if the PuppetDB - # service is being managed in this same catalog, it needs to come before - # this validator." - Service<|title == $puppetdb::params::puppetdb_service|> -> Puppetdb_conn_validator['puppetdb_conn'] + # This is a bit of puppet chicanery that allows us to create a + # conditional dependency. Basically, we're saying that "if the PuppetDB + # service is being managed in this same catalog, it needs to come before + # this validator." + Service<|title == $puppetdb::params::puppetdb_service|> -> Puppetdb_conn_validator['puppetdb_conn'] } # Conditionally manage the `routes.yaml` file. Restart the puppet service @@ -122,21 +122,21 @@ class puppetdb::master::config( # because it polls it automatically. if ($manage_report_processor) { class { 'puppetdb::master::report_processor': - puppet_conf => $puppet_conf, - enable => $enable_reports, - require => $strict_validation ? { true => Puppetdb_conn_validator['puppetdb_conn'], default => Package[$terminus_package] }, + puppet_conf => $puppet_conf, + enable => $enable_reports, + require => $strict_validation ? { true => Puppetdb_conn_validator['puppetdb_conn'], default => Package[$terminus_package] }, } } if ($manage_config) { - # Manage the `puppetdb.conf` file. Restart the puppet service if changes - # are made. - class { 'puppetdb::master::puppetdb_conf': - server => $puppetdb_server, - port => $puppetdb_port, - puppet_confdir => $puppet_confdir, - require => $strict_validation ? { true => Puppetdb_conn_validator['puppetdb_conn'], default => Package[$terminus_package] }, - } + # Manage the `puppetdb.conf` file. Restart the puppet service if changes + # are made. + class { 'puppetdb::master::puppetdb_conf': + server => $puppetdb_server, + port => $puppetdb_port, + puppet_confdir => $puppet_confdir, + require => $strict_validation ? { true => Puppetdb_conn_validator['puppetdb_conn'], default => Package[$terminus_package] }, + } } if ($restart_puppet) { diff --git a/manifests/master/report_processor.pp b/manifests/master/report_processor.pp index 62077f6..2351475 100644 --- a/manifests/master/report_processor.pp +++ b/manifests/master/report_processor.pp @@ -2,7 +2,7 @@ # # This class configures the puppet master to enable the puppetdb report # processor - +# # Parameters: # ['puppet_conf'] - The puppet config file (defaults to /etc/puppet/puppet.conf) # @@ -24,12 +24,15 @@ class puppetdb::master::report_processor( $enable = false ) inherits puppetdb::params { - ini_subsetting { "puppet.conf/reports/puppetdb": - path => $puppet_conf, - section => 'master', - setting => 'reports', - subsetting => 'puppetdb', - subsetting_separator => ',', - ensure => $enable ? { true => present, default => absent } + ini_subsetting { 'puppet.conf/reports/puppetdb': + ensure => $enable ? { + true => present, + default => absent + }, + path => $puppet_conf, + section => 'master', + setting => 'reports', + subsetting => 'puppetdb', + subsetting_separator => ',' } } diff --git a/manifests/params.pp b/manifests/params.pp index 3641f9f..17edc29 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -78,7 +78,7 @@ class puppetdb::params { $puppet_confdir = '/etc/puppetlabs/puppet' $terminus_package = 'pe-puppetdb-terminus' $embedded_subname = 'file:/opt/puppet/share/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true' - + case $::osfamily { 'RedHat': { $puppetdb_initconf = '/etc/sysconfig/pe-puppetdb' @@ -89,7 +89,7 @@ class puppetdb::params { default: { fail("${module_name} supports osfamily's RedHat and Debian. Your osfamily is recognized as ${::osfamily}") } - } + } } else { $puppetdb_package = 'puppetdb' $puppetdb_service = 'puppetdb' @@ -98,7 +98,7 @@ class puppetdb::params { $puppet_confdir = '/etc/puppet' $terminus_package = 'puppetdb-terminus' $embedded_subname = 'file:/usr/share/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true' - + case $::osfamily { 'RedHat': { $puppetdb_initconf = '/etc/sysconfig/puppetdb' diff --git a/manifests/server.pp b/manifests/server.pp index 4106ba5..d7863c7 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -190,7 +190,7 @@ class puppetdb::server( } if !empty($java_args) { - + create_resources( 'ini_subsetting', puppetdb_create_subsetting_resource_hash( diff --git a/manifests/server/firewall.pp b/manifests/server/firewall.pp index a377c1f..b23db0b 100644 --- a/manifests/server/firewall.pp +++ b/manifests/server/firewall.pp @@ -1,6 +1,6 @@ class puppetdb::server::firewall( $port = '', - $http_port = $puppetdb::params::listen_port, + $http_port = $puppetdb::params::listen_port, $open_http_port = $puppetdb::params::open_listen_port, $ssl_port = $puppetdb::params::ssl_listen_port, $open_ssl_port = $puppetdb::params::open_ssl_listen_port, @@ -27,7 +27,7 @@ class puppetdb::server::firewall( Firewall { notify => Exec['puppetdb-persist-firewall'] } - + if ($port) { notify { 'Deprecation notice: `port` parameter will be removed in future versions of the puppetdb module. Please use ssl_port instead.': } } @@ -35,7 +35,7 @@ class puppetdb::server::firewall( if ($port and $ssl_port) { fail('`port` and `ssl_port` cannot both be defined. `port` is deprecated in favor of `ssl_port`') } - + if ($open_http_port) { firewall { "${http_port} accept - puppetdb": port => $http_port, diff --git a/manifests/server/jetty_ini.pp b/manifests/server/jetty_ini.pp index 4751143..0be82dc 100644 --- a/manifests/server/jetty_ini.pp +++ b/manifests/server/jetty_ini.pp @@ -33,7 +33,7 @@ # class puppetdb::server::jetty_ini( $listen_address = $puppetdb::params::listen_address, - $listen_port = $puppetdb::params::listen_port, + $listen_port = $puppetdb::params::listen_port, $ssl_listen_address = $puppetdb::params::ssl_listen_address, $ssl_listen_port = $puppetdb::params::ssl_listen_port, $disable_ssl = $puppetdb::params::disable_ssl, diff --git a/tests/puppetdb-postgres-distributed.pp b/tests/puppetdb-postgres-distributed.pp index 9be52f4..c7477a3 100644 --- a/tests/puppetdb-postgres-distributed.pp +++ b/tests/puppetdb-postgres-distributed.pp @@ -11,7 +11,7 @@ node puppet { # This node is our postgres server node puppetdb-postgres { # Here we install and configure postgres and the puppetdb database instance - # Optionally, open the firewall port for postgres so puppetdb server can + # Optionally, open the firewall port for postgres so puppetdb server can # gain access. class { 'puppetdb::database::postgresql': listen_addresses => 'puppetdb-postgres', @@ -23,8 +23,8 @@ node puppetdb-postgres { node puppetdb { # Here we install and configure the puppetdb server, and tell it where to # find the postgres database. - # Set open_ssl_listen_port to allow the puppet master to gain access to - # puppetdb. Optionally, set open_listen_port to open the HTTP port so + # Set open_ssl_listen_port to allow the puppet master to gain access to + # puppetdb. Optionally, set open_listen_port to open the HTTP port so # you can access the PuppetDB dashboard. class { 'puppetdb::server': database_host => 'puppetdb-postgres',