From 8b321cd316a50ec5569bb93a44713d2d8d0e47a8 Mon Sep 17 00:00:00 2001
From: Jenkins ConfDroid
ERB Template Parser
Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files)
-Markdown-lint
-Spellcheck
-Sonar Quality Gate
ERB Template Parser
Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files)
-Markdown-lint
-Spellcheck
-Sonar Quality Gate
# File 'manifests/main/config.pp', line 6
@@ -115,9 +113,7 @@
class cd_alloy::main::config (
) inherits cd_alloy::params {
-
include cd_alloy::main::service
-
}
# File 'manifests/main/dirs.pp', line 6
@@ -126,19 +125,18 @@
class cd_alloy::main::dirs (
) inherits cd_alloy::params {
-
require cd_alloy::main::install
# main config dir
file { $ay_main_dir:
- ensure => directory,
- owner => 'root',
- group => 'alloy',
- mode => '0770',
- selrange => s0,
- selrole => object_r,
- seltype => etc_t,
- seluser => system_u,
+ ensure => directory,
+ owner => 'root',
+ group => 'alloy',
+ mode => '0770',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
}
}
# File 'manifests/main/files.pp', line 6
@@ -131,25 +129,23 @@
class cd_alloy::main::files (
) inherits cd_alloy::params {
-
require cd_alloy::main::dirs
# Ensure log_targets is always an array
$log_targets_array = Array($cd_alloy::params::ay_log_targets, true)
file { $ay_main_file:
- ensure => file,
- owner => 'root',
- group => 'root',
- mode => '0644',
- selrange => s0,
- selrole => object_r,
- seltype => etc_t,
- seluser => system_u,
- content => template('cd_alloy/config.alloy.erb'),
- notify => Service[$ay_service],
+ ensure => file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ content => template('cd_alloy/config.alloy.erb'),
+ notify => Service[$ay_service],
}
-
}
# File 'manifests/main/install.pp', line 6
@@ -118,7 +117,6 @@
class cd_alloy::main::install (
) inherits cd_alloy::params {
-
require cd_alloy::main::yumrepo
package { $reqpackages:
diff --git a/doc/puppet_classes/cd_alloy_3A_3Amain_3A_3Aservice.html b/doc/puppet_classes/cd_alloy_3A_3Amain_3A_3Aservice.html
index b677f09..4b6574c 100644
--- a/doc/puppet_classes/cd_alloy_3A_3Amain_3A_3Aservice.html
+++ b/doc/puppet_classes/cd_alloy_3A_3Amain_3A_3Aservice.html
@@ -112,8 +112,7 @@
14
15
16
-17
-18
+17
# File 'manifests/main/service.pp', line 6
@@ -121,14 +120,13 @@
class cd_alloy::main::service (
) inherits cd_alloy::params {
-
require cd_alloy::main::files
service { $ay_service:
- ensure => running,
- hasstatus => true,
- hasrestart => true,
- enable => true,
+ ensure => running,
+ hasstatus => true,
+ hasrestart => true,
+ enable => true,
}
}
the logging targets
+-14 15 16 17 @@ -305,44 +309,39 @@ 40 41 42 -43 -44 -45+43
# File 'manifests/params.pp', line 14
+ # File 'manifests/params.pp', line 15
class cd_alloy::params (
-$reqpackages = 'alloy',
-$pkg_ensure = 'latest',
+ String $reqpackages = 'alloy',
+ String $pkg_ensure = 'latest',
# loki
-$ay_manage_loki = true,
-$ay_loki_url = 'https://loki.example.net/loki/api/v1/push',
-$ay_loki_username = '',
-$ay_loki_userpass = '',
-$ay_log_targets = ['/var/log/messages','/var/log/secure',],
+ String $ay_manage_loki = true,
+ String $ay_loki_url = 'https://loki.example.net/loki/api/v1/push',
+ String $ay_loki_username = 'loki_user',
+ String $ay_loki_userpass = 'loki_pass',
+ Array $ay_log_targets = ['/var/log/messages','/var/log/secure',],
# prometheus
-$ay_manage_prom = true,
-$ay_prom_url = 'https://prometheus.example.net/api/v1/write',
+ Boolean $ay_manage_prom = true,
+ String $ay_prom_url = 'https://prometheus.example.net/api/v1/write',
) {
+ # service
+ $ay_service = 'alloy'
-# service
-$ay_service = 'alloy'
-
-# dirs
-$ay_main_dir = '/etc/alloy'
-
-# files
-$ay_main_file = "${ay_main_dir}/config.alloy"
+ # dirs
+ $ay_main_dir = '/etc/alloy'
+ # files
+ $ay_main_file = "${ay_main_dir}/config.alloy"
# includes must be last
include cd_alloy::main::config
-
}