fix class names
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user