diff --git a/.bundle/config b/.bundle/config index b2a5494d6..319a242b3 100644 --- a/.bundle/config +++ b/.bundle/config @@ -1,6 +1,6 @@ --- BUNDLE_JOBS: "4" -BUNDLE_PATH: ".vendor/bundle" +BUNDLE_PATH: "vendor/bundle" BUNDLE_DISABLE_SHARED_GEMS: "true" BUNDLE_BUILD: "--no-ri --no-rdoc" BUNDLE_WITHOUT: "system_tests" diff --git a/Gemfile b/Gemfile index a3d30ab27..25b8daf69 100644 --- a/Gemfile +++ b/Gemfile @@ -75,9 +75,9 @@ end #move to .sync.yaml in the future gem 'puppetlabs_spec_helper', '>= 2.0' -gem 'puppet-lint', '>= 2.0.0' -gem 'facter', '>= 2.4.0' -gem 'facterdb', '>= 1.0.0' +gem 'puppet-lint', '>= 2.4.2' +gem 'facter', '>= 2.5.1' +gem 'facterdb', '>= 1.4.0' gem 'rspec-puppet-facts', '>= 1.6.0' gem 'serverspec' gem 'r10k' diff --git a/examples/example1/modules/profile/manifests/icinga2/api_agent.pp b/examples/example1/modules/profile/manifests/icinga2/api_agent.pp index b82bad08b..fe3be7e28 100644 --- a/examples/example1/modules/profile/manifests/icinga2/api_agent.pp +++ b/examples/example1/modules/profile/manifests/icinga2/api_agent.pp @@ -5,8 +5,8 @@ ) { class { 'icinga2': - confd => false, - features => ['mainlog'], + confd => false, + features => ['mainlog'], } # Feature: api @@ -26,8 +26,8 @@ # Declaration class { 'profile::icinga2::agent': - endpoints => { - 'NodeName' => {}, + endpoints => { + 'NodeName' => {}, 'satellite.example.org' => { 'host' => '172.16.2.11', }, @@ -35,9 +35,9 @@ zones => { 'ZoneName' => { 'endpoints' => ['NodeName'], - 'parent' => 'dmz', + 'parent' => 'dmz', }, - 'dmz' => { + 'dmz' => { 'endpoints' => ['satellite.example.org'], }, }, diff --git a/examples/example1/modules/profile/manifests/icinga2/api_satellite.pp b/examples/example1/modules/profile/manifests/icinga2/api_satellite.pp index 3353ca3c8..3d2465c51 100644 --- a/examples/example1/modules/profile/manifests/icinga2/api_satellite.pp +++ b/examples/example1/modules/profile/manifests/icinga2/api_satellite.pp @@ -32,7 +32,7 @@ zone_name => 'dmz', endpoints => { 'satellite.example.org' => {}, - 'master.example.org' => { + 'master.example.org' => { 'host' => '172.16.1.11', }, }, @@ -40,7 +40,7 @@ 'master' => { 'endpoints' => ['master.example.org'], }, - 'dmz' => { + 'dmz' => { 'endpoints' => ['satellite.example.org'], 'parent' => 'master', }, diff --git a/examples/example3/site/profile/manifests/backuppc/server.pp b/examples/example3/site/profile/manifests/backuppc/server.pp index d779221c3..4adf3fd52 100644 --- a/examples/example3/site/profile/manifests/backuppc/server.pp +++ b/examples/example3/site/profile/manifests/backuppc/server.pp @@ -4,22 +4,22 @@ # Icinga CheckCommand and Apply Rules @@icinga2::object::checkcommand { 'backuppc': - import => [ + import => [ 'plugin-check-command', ], - command => [ + command => [ 'sudo', '-u', 'backuppc', 'PluginContribDir + /check_backuppc', ], - arguments => { + arguments => { '-w' => '$backuppc_wtime$', '-c' => '$backuppc_ctime$', '-H' => { - 'value' => '$backuppc_desired$', + 'value' => '$backuppc_desired$', 'set_if' => '$backuppc_desired$', }, '-x' => { - 'value' => '$backuppc_exclude$', + 'value' => '$backuppc_exclude$', 'set_if' => '$backuppc_exclude$', }, '-V' => { @@ -35,20 +35,20 @@ 'set_if' => '$backuppc_statusonly$', }, }, - vars => { + vars => { 'backuppc_wtime' => '2', 'backuppc_ctime' => '4', }, - target => '/etc/icinga2/zones.d/global-templates/backuppc-command.conf', + target => '/etc/icinga2/zones.d/global-templates/backuppc-command.conf', } @@file { '/etc/icinga2/conf.d/services/backuppc.conf': - ensure => file, - owner => 'nagios', - group => 'nagios', - tag => 'icinga2::config::exported', + ensure => file, + owner => 'nagios', + group => 'nagios', + tag => 'icinga2::config::exported', source => [ - "puppet:///modules/1024/icinga/services/backuppc.conf", + 'puppet:///modules/1024/icinga/services/backuppc.conf', ], } } diff --git a/examples/example3/site/profile/manifests/icinga/agent.pp b/examples/example3/site/profile/manifests/icinga/agent.pp index ca9b31422..0a0840644 100644 --- a/examples/example3/site/profile/manifests/icinga/agent.pp +++ b/examples/example3/site/profile/manifests/icinga/agent.pp @@ -34,20 +34,20 @@ # The vars (set in the various nodes hiera files) are used to Apply Services # to these hosts. (See profile::icinga::server) @@::icinga2::object::host { $::fqdn: - display_name => $::fqdn, - address => $::ipaddress_eth0, - check_command => 'hostalive', - vars => hiera_hash('icinga_vars', {}), - target => "/etc/icinga2/zones.d/master/${::fqdn}.conf" + display_name => $::fqdn, + address => $::ipaddress_eth0, + check_command => 'hostalive', + vars => hiera_hash('icinga_vars', {}), + target => "/etc/icinga2/zones.d/master/${::fqdn}.conf" } # Create virtual resources for this agent node - @@::icinga2::object::endpoint { "$::fqdn": - host => "$::ipaddress_eth0", + @@::icinga2::object::endpoint { "${::fqdn}": + host => "${::ipaddress_eth0}", } - @@::icinga2::object::zone { "$::fqdn": - endpoints => [ "$::fqdn", ], + @@::icinga2::object::zone { "${::fqdn}": + endpoints => [ "${::fqdn}", ], parent => 'master', } diff --git a/examples/example3/site/profile/manifests/icinga/applyrules.pp b/examples/example3/site/profile/manifests/icinga/applyrules.pp index 73b61096f..2ec680a67 100644 --- a/examples/example3/site/profile/manifests/icinga/applyrules.pp +++ b/examples/example3/site/profile/manifests/icinga/applyrules.pp @@ -11,32 +11,32 @@ # example's README on why this is the case. file { '/etc/icinga2/conf.d/services/nginx.conf': - ensure => file, - owner => 'nagios', - group => 'nagios', - tag => 'icinga2::config::file', + ensure => file, + owner => 'nagios', + group => 'nagios', + tag => 'icinga2::config::file', source => [ - "puppet:///modules/1024/icinga/services/nginx.conf", + 'puppet:///modules/1024/icinga/services/nginx.conf', ], } file { '/etc/icinga2/conf.d/services/postgres.conf': - ensure => file, - owner => 'nagios', - group => 'nagios', - tag => 'icinga2::config::file', + ensure => file, + owner => 'nagios', + group => 'nagios', + tag => 'icinga2::config::file', source => [ - "puppet:///modules/1024/icinga/services/postgres.conf", + 'puppet:///modules/1024/icinga/services/postgres.conf', ], } file { '/etc/icinga2/conf.d/services/elasticsearch.conf': - ensure => file, - owner => 'nagios', - group => 'nagios', - tag => 'icinga2::config::file', + ensure => file, + owner => 'nagios', + group => 'nagios', + tag => 'icinga2::config::file', source => [ - "puppet:///modules/1024/icinga/services/elasticsearch.conf", + 'puppet:///modules/1024/icinga/services/elasticsearch.conf', ], } diff --git a/manifests/feature/elasticsearch.pp b/manifests/feature/elasticsearch.pp index 9f9faf7d1..c538b4196 100644 --- a/manifests/feature/elasticsearch.pp +++ b/manifests/feature/elasticsearch.pp @@ -180,11 +180,13 @@ } # The password parameter isn't parsed anymore. + # lint:ignore:variables_not_enclosed if $password { $_password = "-:\"${password}\"" } else { $_password = undef } + # lint:endignore $attrs = { host => $host, diff --git a/manifests/feature/icingadb.pp b/manifests/feature/icingadb.pp index a089bef4b..989db0d86 100644 --- a/manifests/feature/icingadb.pp +++ b/manifests/feature/icingadb.pp @@ -33,13 +33,14 @@ 'present' => Class['::icinga2::service'], default => undef, } - + # lint:ignore:variables_not_enclosed # The password parameter isn't parsed anymore. if $password { $_password = "-:\"${password}\"" } else { $_password = undef } + # lint:endignore # compose attributes $attrs = { diff --git a/manifests/feature/idomysql.pp b/manifests/feature/idomysql.pp index 3bbc6c1ca..d467e810d 100644 --- a/manifests/feature/idomysql.pp +++ b/manifests/feature/idomysql.pp @@ -257,6 +257,7 @@ $attrs_ssl = { enable_ssl => $enable_ssl } } + # lint:ignore:variables_not_enclosed $attrs = { host => $host, port => $port, @@ -272,6 +273,7 @@ cleanup => $cleanup, categories => $categories, } + # lint:endignore # install additional package if $ido_mysql_package_name and $manage_package { diff --git a/manifests/feature/idopgsql.pp b/manifests/feature/idopgsql.pp index 774fbcb83..347036fed 100644 --- a/manifests/feature/idopgsql.pp +++ b/manifests/feature/idopgsql.pp @@ -89,7 +89,7 @@ 'present' => Class['::icinga2::service'], default => undef, } - + # lint:ignore:variables_not_enclosed $attrs = { host => $host, port => $port, @@ -104,6 +104,7 @@ cleanup => $cleanup, categories => $categories, } + # lint:endignore # install additional package if $ido_pgsql_package_name and $manage_package { diff --git a/manifests/feature/influxdb.pp b/manifests/feature/influxdb.pp index 9e16d7e2d..17f54048a 100644 --- a/manifests/feature/influxdb.pp +++ b/manifests/feature/influxdb.pp @@ -203,12 +203,14 @@ $attrs_ssl = { ssl_enable => $enable_ssl } } + # lint:ignore:variables_not_enclosed # The password parameter isn't parsed anymore. if $password { $_password = "-:\"${password}\"" } else { $_password = undef } + # lint:endignore $attrs = { host => $host, diff --git a/manifests/object/apiuser.pp b/manifests/object/apiuser.pp index 0c4df17ef..751fb5ce1 100644 --- a/manifests/object/apiuser.pp +++ b/manifests/object/apiuser.pp @@ -67,12 +67,14 @@ Variant[String, Integer] $order = 30, ) { + # lint:ignore:variables_not_enclosed # The password parameter isn't parsed anymore. if $password { $_password = "-:\"${password}\"" } else { $_password = undef } + # lint:endignore # compose the attributes $attrs = { diff --git a/metadata.json b/metadata.json index f9bf60aac..289d3e3a9 100644 --- a/metadata.json +++ b/metadata.json @@ -19,6 +19,10 @@ { "name": "puppetlabs/concat", "version_requirement": ">= 2.1.0 < 7.0.0" + }, + { + "name": "icinga/icinga", + "version_requirement": ">= 0.1.3" } ], "operatingsystem_support": [