From d4eff6a815af4cd5b249cdaf6fb1bda382a3231b Mon Sep 17 00:00:00 2001 From: Tom De Vylder Date: Thu, 23 Apr 2015 11:40:42 +0200 Subject: [PATCH] Style fixes --- manifests/config.pp | 17 ++++++++++------- manifests/config/authentication_database.pp | 6 +++--- manifests/config/authentication_external.pp | 6 +++--- manifests/config/resource_database.pp | 14 +++++++------- manifests/config/resource_file.pp | 8 ++++---- manifests/config/resource_ldap.pp | 14 +++++++------- manifests/config/resource_livestatus.pp | 7 +++---- manifests/config/roles.pp | 12 ++++++------ manifests/init.pp | 2 +- manifests/preinstall/redhat.pp | 6 +++--- 10 files changed, 47 insertions(+), 45 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index a28ef5d..589db8f 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -32,24 +32,24 @@ class icingaweb2::config ( recurse => $::icingaweb2::config_dir_recurse; "${::icingaweb2::config_dir}/enabledModules": - ensure => directory, - mode => $::icingaweb2::config_dir_mode; + ensure => directory, + mode => $::icingaweb2::config_dir_mode; "${::icingaweb2::config_dir}/modules": - ensure => directory, - mode => $::icingaweb2::config_dir_mode; + ensure => directory, + mode => $::icingaweb2::config_dir_mode; "${::icingaweb2::config_dir}/authentication.ini": ensure => file; "${::icingaweb2::config_dir}/config.ini": - ensure => file; + ensure => file; "${::icingaweb2::config_dir}/resources.ini": - ensure => file; + ensure => file; "${::icingaweb2::config_dir}/roles.ini": - ensure => file; + ensure => file; $::icingaweb2::web_root: ensure => directory, @@ -89,11 +89,13 @@ class icingaweb2::config ( setting => 'log', value => "\"${::icingaweb2::log_method}\"", } + ini_setting { 'icingaweb2 config logging level': section => 'logging', setting => 'level', value => "\"${::icingaweb2::log_level}\"", } + ini_setting { 'icingaweb2 config logging application': section => 'logging', setting => 'application', @@ -106,6 +108,7 @@ class icingaweb2::config ( setting => 'store', value => "\"${::icingaweb2::log_store}\"", } + ini_setting { 'icingaweb2 config preferences resource': section => 'preferences', setting => 'resource', diff --git a/manifests/config/authentication_database.pp b/manifests/config/authentication_database.pp index 7e9b821..052a375 100644 --- a/manifests/config/authentication_database.pp +++ b/manifests/config/authentication_database.pp @@ -1,10 +1,9 @@ # Define for setting IcingaWeb2 Authentication - +# define icingaweb2::config::authentication_database ( - $auth_section = undef, $auth_resource = undef, + $auth_section = undef, ) { - Ini_Setting { ensure => present, require => File["${::icingaweb2::config_dir}/authentication.ini"], @@ -23,3 +22,4 @@ define icingaweb2::config::authentication_database ( value => '"db"', } } + diff --git a/manifests/config/authentication_external.pp b/manifests/config/authentication_external.pp index e25831c..f20cd1f 100644 --- a/manifests/config/authentication_external.pp +++ b/manifests/config/authentication_external.pp @@ -1,10 +1,9 @@ # Define for setting IcingaWeb2 Authentication - +# define icingaweb2::config::authentication_external ( - $auth_section = undef, $auth_filter = undef, + $auth_section = undef, ) { - Ini_Setting { ensure => present, require => File["${::icingaweb2::config_dir}/authentication.ini"], @@ -23,3 +22,4 @@ define icingaweb2::config::authentication_external ( value => '"external"', } } + diff --git a/manifests/config/resource_database.pp b/manifests/config/resource_database.pp index 8badf16..fd0b916 100644 --- a/manifests/config/resource_database.pp +++ b/manifests/config/resource_database.pp @@ -1,15 +1,14 @@ -# Define for setting IcingaWeb2 Database Resource - +# Define for setting IcingaWeb2 Database Resource +# define icingaweb2::config::resource_database ( - $resource_name = $title, $resource_db = undef, - $resource_host = undef, - $resource_port = undef, $resource_dbname = undef, - $resource_username = undef, + $resource_host = undef, + $resource_name = $title, $resource_password = undef, + $resource_port = undef, + $resource_username = undef, ) { - Ini_Setting { ensure => present, require => File["${::icingaweb2::config_dir}/resources.ini"], @@ -58,3 +57,4 @@ define icingaweb2::config::resource_database ( value => "\"${resource_password}\"", } } + diff --git a/manifests/config/resource_file.pp b/manifests/config/resource_file.pp index 0756729..6260814 100644 --- a/manifests/config/resource_file.pp +++ b/manifests/config/resource_file.pp @@ -1,11 +1,10 @@ -# Define for setting IcingaWeb2 File Resource - +# Define for setting IcingaWeb2 File Resource +# define icingaweb2::config::resource_file ( - $resource_name = $title, $resource_filepath = undef, + $resource_name = $title, $resource_pattern = undef, ) { - Ini_Setting { ensure => present, require => File["${::icingaweb2::config_dir}/resources.ini"], @@ -30,3 +29,4 @@ define icingaweb2::config::resource_file ( value => "\"${resource_pattern}\"", } } + diff --git a/manifests/config/resource_ldap.pp b/manifests/config/resource_ldap.pp index f61d535..986c2df 100644 --- a/manifests/config/resource_ldap.pp +++ b/manifests/config/resource_ldap.pp @@ -1,14 +1,13 @@ -# Define for setting IcingaWeb2 LDAP Resource - +# Define for setting IcingaWeb2 LDAP Resource +# define icingaweb2::config::resource_ldap ( - $resource_name = $title, - $resource_host = undef, - $resource_port = undef, - $resource_root_dn = undef, $resource_bind_dn = undef, $resource_bind_pw = undef, + $resource_host = undef, + $resource_name = $title, + $resource_port = undef, + $resource_root_dn = undef, ) { - Ini_Setting { ensure => present, require => File["${::icingaweb2::config_dir}/resources.ini"], @@ -51,3 +50,4 @@ define icingaweb2::config::resource_ldap ( value => "\"${resource_bind_pw}\"", } } + diff --git a/manifests/config/resource_livestatus.pp b/manifests/config/resource_livestatus.pp index 775967e..b4a1201 100644 --- a/manifests/config/resource_livestatus.pp +++ b/manifests/config/resource_livestatus.pp @@ -1,10 +1,9 @@ -# Define for setting IcingaWeb2 LiveStatus - +# Define for setting IcingaWeb2 LiveStatus +# define icingaweb2::config::resource_livestatus ( $resource_name = $title, $resource_socket = undef, ) { - Ini_Setting { ensure => present, require => File["${::icingaweb2::config_dir}/resources.ini"], @@ -22,5 +21,5 @@ define icingaweb2::config::resource_livestatus ( setting => 'socket', value => "\"${resource_socket}\"", } - } + diff --git a/manifests/config/roles.pp b/manifests/config/roles.pp index 798219d..e045d05 100644 --- a/manifests/config/roles.pp +++ b/manifests/config/roles.pp @@ -1,14 +1,13 @@ -# Define for setting IcingaWeb2 Roles - +# Define for setting IcingaWeb2 Roles +# define icingaweb2::config::roles ( - $role_name = $title, - $role_users = undef, $role_groups = undef, - $role_permissions = undef, $role_host_filter = undef, + $role_name = $title, + $role_permissions = undef, $role_service_filter = undef, + $role_users = undef, ) { - Ini_Setting { ensure => present, require => File["${::icingaweb2::config_dir}/roles.ini"], @@ -45,3 +44,4 @@ define icingaweb2::config::roles ( value => "\"${role_service_filter}\"", } } + diff --git a/manifests/init.pp b/manifests/init.pp index 416c65f..392bf04 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -252,11 +252,11 @@ class icingaweb2 ( validate_string($template_config) validate_string($template_resources) validate_string($template_roles) + if $::icingaweb2::manage_apache_vhost { validate_string($template_apache) } - if $pkg_repo_release_metadata_expire { validate_string($pkg_repo_release_metadata_expire) } diff --git a/manifests/preinstall/redhat.pp b/manifests/preinstall/redhat.pp index 6e97065..6bff62d 100644 --- a/manifests/preinstall/redhat.pp +++ b/manifests/preinstall/redhat.pp @@ -32,10 +32,10 @@ define icingaweb2::preinstall::redhat( } } - # TODO 'Debian': {} - # TODO 'Ubuntu': {} - # TODO 'Fedora': {} # TODO 'Amazon': {} + # TODO 'Debian': {} + # TODO 'Fedora': {} + # TODO 'Ubuntu': {} default: { # Already caught by icingaweb2::preinstall