From 5a480f224866819c4f84b33548d1e0e927634270 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Sun, 2 Mar 2025 13:49:35 +0100 Subject: [PATCH] fix class names --- README.md | 2 +- manifests/init.pp | 10 +++++----- manifests/main/config.pp | 12 ++++++------ manifests/main/dirs.pp | 12 ++++++------ manifests/main/files.pp | 16 ++++++++-------- manifests/main/install.pp | 12 ++++++------ manifests/main/service.pp | 10 +++++----- manifests/main/yumrepo.pp | 10 +++++----- manifests/params.pp | 10 +++++----- 9 files changed, 47 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 69badca..a561f8a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Grafana Alloy is a log management agent built by Grafana labs to scrape and forward logs to Loki, a log management system also built by Grafana labs. Then you can use Grafana itself to visualize those logs and built an alerting system. -`cd_alloy` is a Puppet module to automate installation and configuration of alloy. +`alloy_cd` is a Puppet module to automate installation and configuration of alloy. ## WARNING diff --git a/manifests/init.pp b/manifests/init.pp index fb53533..d083d7f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,8 +1,8 @@ -## cd_alloy::init.pp -# Module name: cd_alloy +## alloy_cd::init.pp +# Module name: alloy_cd # Author: Arne Teuke (arne_teuke@confdroid.com) -# @summary Class initializes the cd_alloy module. +# @summary Class initializes the alloy_cd module. ############################################################################## -class cd_alloy { - include cd_alloy::params +class alloy_cd { + include alloy_cd::params } diff --git a/manifests/main/config.pp b/manifests/main/config.pp index a3d1c78..90bca00 100644 --- a/manifests/main/config.pp +++ b/manifests/main/config.pp @@ -1,10 +1,10 @@ -#### cd_alloy::main::config.pp -# Module name: cd_alloy +#### alloy_cd::main::config.pp +# Module name: alloy_cd # Author: Arne Teuke (arne_teuke@confdroid.com) -# @summary Class manages module logic for the cd_alloy module +# @summary Class manages module logic for the alloy_cd module ############################################################################### -class cd_alloy::main::config ( +class alloy_cd::main::config ( -) inherits cd_alloy::params { - include cd_alloy::main::service +) inherits alloy_cd::params { + include alloy_cd::main::service } diff --git a/manifests/main/dirs.pp b/manifests/main/dirs.pp index 0958bb0..07a6474 100644 --- a/manifests/main/dirs.pp +++ b/manifests/main/dirs.pp @@ -1,12 +1,12 @@ -## cd_alloy::main::dirs.pp -# Module name: cd_alloy +## alloy_cd::main::dirs.pp +# Module name: alloy_cd # Author: Arne Teuke (arne_teuke@confdroid.com) -# @summary Class manages required directories for the cd_alloy module +# @summary Class manages required directories for the alloy_cd module ############################################################################### -class cd_alloy::main::dirs ( +class alloy_cd::main::dirs ( -) inherits cd_alloy::params { - require cd_alloy::main::install +) inherits alloy_cd::params { + require alloy_cd::main::install # main config dir file { $ay_main_dir: diff --git a/manifests/main/files.pp b/manifests/main/files.pp index bf9861e..8243dd3 100644 --- a/manifests/main/files.pp +++ b/manifests/main/files.pp @@ -1,15 +1,15 @@ -## cd_alloy::main::files.pp -# Module name: cd_alloy +## alloy_cd::main::files.pp +# Module name: alloy_cd # Author: Arne Teuke (arne_teuke@confdroid.com) -# @summary Class manages required config files for the cd_alloy module +# @summary Class manages required config files for the alloy_cd module ############################################################################### -class cd_alloy::main::files ( +class alloy_cd::main::files ( -) inherits cd_alloy::params { - require cd_alloy::main::dirs +) inherits alloy_cd::params { + require alloy_cd::main::dirs # Ensure log_targets is always an array - $log_targets_array = Array($cd_alloy::params::ay_log_targets, true) + $log_targets_array = Array($alloy_cd::params::ay_log_targets, true) file { $ay_main_file: ensure => file, @@ -20,7 +20,7 @@ class cd_alloy::main::files ( selrole => object_r, seltype => etc_t, seluser => system_u, - content => template('cd_alloy/config.alloy.erb'), + content => template('alloy_cd/config.alloy.erb'), notify => Service[$ay_service], } } diff --git a/manifests/main/install.pp b/manifests/main/install.pp index 92760cd..223c385 100644 --- a/manifests/main/install.pp +++ b/manifests/main/install.pp @@ -1,12 +1,12 @@ -## cd_alloy::main::install.pp -# Module name: cd_alloy +## alloy_cd::main::install.pp +# Module name: alloy_cd # Author: Arne Teuke (arne_teuke@confdroid.com) -# @summary Class installs packages for the cd_alloy module +# @summary Class installs packages for the alloy_cd module ############################################################################### -class cd_alloy::main::install ( +class alloy_cd::main::install ( -) inherits cd_alloy::params { - require cd_alloy::main::yumrepo +) inherits alloy_cd::params { + require alloy_cd::main::yumrepo package { $reqpackages: ensure => $pkg_ensure, diff --git a/manifests/main/service.pp b/manifests/main/service.pp index 27c6f6c..3ad9bdd 100644 --- a/manifests/main/service.pp +++ b/manifests/main/service.pp @@ -1,12 +1,12 @@ -## cd_alloy::main::service.pp -# Module name: cd_alloy +## alloy_cd::main::service.pp +# Module name: alloy_cd # Author: Arne Teuke (arne_teuke@confdroid.com) # @summary Class manages the alloy service ############################################################################### -class cd_alloy::main::service ( +class alloy_cd::main::service ( -) inherits cd_alloy::params { - require cd_alloy::main::files +) inherits alloy_cd::params { + require alloy_cd::main::files service { $ay_service: ensure => running, diff --git a/manifests/main/yumrepo.pp b/manifests/main/yumrepo.pp index dad848e..b2f63d4 100644 --- a/manifests/main/yumrepo.pp +++ b/manifests/main/yumrepo.pp @@ -1,11 +1,11 @@ -## cd_alloy::main::yumrepo.pp -# Module name: cd_alloy +## alloy_cd::main::yumrepo.pp +# Module name: alloy_cd # Author: Arne Teuke (arne_teuke@confdroid.com) -# @summary class install yum repos for the cd_alloy module +# @summary class install yum repos for the alloy_cd module ############################################################################## -class cd_alloy::main::yumrepo ( +class alloy_cd::main::yumrepo ( -) inherits cd_alloy::params { +) inherits alloy_cd::params { # test yumrepo { 'grafana': diff --git a/manifests/params.pp b/manifests/params.pp index 6b6ff31..d1c6608 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,5 +1,5 @@ -## cd_alloy::params.pp -# Module name: cd_alloy +## alloy_cd::params.pp +# Module name: alloy_cd # Author: Arne Teuke (arne_teuke@confdroid.com) # @param [string] reqpackages which packages to install # @param [string] pkg_ensure 'latest' or 'present' @@ -10,9 +10,9 @@ # @param [boolean] ay_manage_prom whether to manage metric forwarding # @param [string] ay_prom_url the url where alloy will send metrics # @param [array] ay_log_targets the logging targets -# @summary Class contains all parameters for the cd_alloy module. +# @summary Class contains all parameters for the alloy_cd module. ############################################################################## -class cd_alloy::params ( +class alloy_cd::params ( String $reqpackages = 'alloy', String $pkg_ensure = 'latest', @@ -39,5 +39,5 @@ class cd_alloy::params ( $ay_main_file = "${ay_main_dir}/config.alloy" # includes must be last - include cd_alloy::main::config + include alloy_cd::main::config }