OP#647 initial commit after fork
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
## alloy_cd::init.pp
|
||||
# Module name: alloy_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class initializes the alloy_cd module.
|
||||
## confdroid_alloy::init.pp
|
||||
# Module name: confdroid_alloy
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class initializes the confdroid_alloy module.
|
||||
##############################################################################
|
||||
class alloy_cd {
|
||||
include alloy_cd::params
|
||||
class confdroid_alloy {
|
||||
include confdroid_alloy::params
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#### alloy_cd::main::config.pp
|
||||
# Module name: alloy_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class manages module logic for the alloy_cd module
|
||||
#### confdroid_alloy::main::config.pp
|
||||
# Module name: confdroid_alloy
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages module logic for the confdroid_alloy module
|
||||
###############################################################################
|
||||
class alloy_cd::main::config (
|
||||
class confdroid_alloy::main::config (
|
||||
|
||||
) inherits alloy_cd::params {
|
||||
include alloy_cd::main::service
|
||||
) inherits confdroid_alloy::params {
|
||||
include confdroid_alloy::main::service
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
## alloy_cd::main::dirs.pp
|
||||
# Module name: alloy_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class manages required directories for the alloy_cd module
|
||||
## confdroid_alloy::main::dirs.pp
|
||||
# Module name: confdroid_alloy
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages required directories for the confdroid_alloy module
|
||||
###############################################################################
|
||||
class alloy_cd::main::dirs (
|
||||
class confdroid_alloy::main::dirs (
|
||||
|
||||
) inherits alloy_cd::params {
|
||||
require alloy_cd::main::install
|
||||
) inherits confdroid_alloy::params {
|
||||
require confdroid_alloy::main::install
|
||||
|
||||
# main config dir
|
||||
file { $ay_main_dir:
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
## alloy_cd::main::files.pp
|
||||
# Module name: alloy_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class manages required config files for the alloy_cd module
|
||||
## confdroid_alloy::main::files.pp
|
||||
# Module name: confdroid_alloy
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages required config files for the confdroid_alloy module
|
||||
###############################################################################
|
||||
class alloy_cd::main::files (
|
||||
class confdroid_alloy::main::files (
|
||||
|
||||
) inherits alloy_cd::params {
|
||||
require alloy_cd::main::dirs
|
||||
) inherits confdroid_alloy::params {
|
||||
require confdroid_alloy::main::dirs
|
||||
|
||||
# Ensure log_targets is always an array
|
||||
$log_targets_array = Array($alloy_cd::params::ay_log_targets, true)
|
||||
$log_targets_array = Array($confdroid_alloy::params::ay_log_targets, true)
|
||||
|
||||
file { $ay_main_file:
|
||||
ensure => file,
|
||||
@@ -20,7 +20,7 @@ class alloy_cd::main::files (
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
content => template('alloy_cd/config.alloy.erb'),
|
||||
content => template('confdroid_alloy/config.alloy.erb'),
|
||||
notify => Service[$ay_service],
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class alloy_cd::main::files (
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
content => template('alloy_cd/logrotate.rsyslog.erb'),
|
||||
content => template('confdroid_alloy/logrotate.rsyslog.erb'),
|
||||
}
|
||||
|
||||
# manage log file group permissions
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
## alloy_cd::main::install.pp
|
||||
# Module name: alloy_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class installs packages for the alloy_cd module
|
||||
## confdroid_alloy::main::install.pp
|
||||
# Module name: confdroid_alloy
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class installs packages for the confdroid_alloy module
|
||||
###############################################################################
|
||||
class alloy_cd::main::install (
|
||||
class confdroid_alloy::main::install (
|
||||
|
||||
) inherits alloy_cd::params {
|
||||
require alloy_cd::main::yumrepo
|
||||
) inherits confdroid_alloy::params {
|
||||
require confdroid_alloy::main::yumrepo
|
||||
|
||||
package { $reqpackages:
|
||||
ensure => $pkg_ensure,
|
||||
package { $ay_reqpackages:
|
||||
ensure => $ay_pkg_ensure,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
## alloy_cd::main::service.pp
|
||||
# Module name: alloy_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
## confdroid_alloy::main::service.pp
|
||||
# Module name: confdroid_alloy
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages the alloy service
|
||||
###############################################################################
|
||||
class alloy_cd::main::service (
|
||||
class confdroid_alloy::main::service (
|
||||
|
||||
) inherits alloy_cd::params {
|
||||
require alloy_cd::main::files
|
||||
) inherits confdroid_alloy::params {
|
||||
require confdroid_alloy::main::files
|
||||
|
||||
service { $ay_service:
|
||||
ensure => running,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## alloy_cd::main::yumrepo.pp
|
||||
# Module name: alloy_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary class install yum repos for the alloy_cd module
|
||||
## confdroid_alloy::main::yumrepo.pp
|
||||
# Module name: confdroid_alloy
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary class install yum repos for the confdroid_alloy module
|
||||
##############################################################################
|
||||
class alloy_cd::main::yumrepo (
|
||||
class confdroid_alloy::main::yumrepo (
|
||||
|
||||
) inherits alloy_cd::params {
|
||||
) inherits confdroid_alloy::params {
|
||||
# test
|
||||
yumrepo { 'grafana':
|
||||
ensure => 'present',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
## 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'
|
||||
## confdroid_alloy::params.pp
|
||||
# Module name: confdroid_alloy
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @param [String] ay_reqpackages which packages to install
|
||||
# @param [String] ay_pkg_ensure 'latest' or 'present'
|
||||
# @param [String] ay_loki_url the url where alloy will send logs to.
|
||||
# @param [String] ay_loki_username the username to logon to loki
|
||||
# @param [String] ay_loki_userpass the password to logon to loki
|
||||
@@ -12,15 +12,15 @@
|
||||
# the node exporter (external)
|
||||
# @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 alloy_cd module.
|
||||
# @summary Class contains all parameters for the confdroid_alloy module.
|
||||
##############################################################################
|
||||
class alloy_cd::params (
|
||||
class confdroid_alloy::params (
|
||||
|
||||
String $reqpackages = 'alloy',
|
||||
String $pkg_ensure = 'latest',
|
||||
String $ay_reqpackages = 'alloy',
|
||||
String $ay_pkg_ensure = 'latest',
|
||||
|
||||
# loki
|
||||
Boolean $ay_manage_loki = true,
|
||||
Boolean $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',
|
||||
@@ -44,5 +44,5 @@ class alloy_cd::params (
|
||||
$ay_main_file = "${ay_main_dir}/config.alloy"
|
||||
|
||||
# includes must be last
|
||||
include alloy_cd::main::config
|
||||
include confdroid_alloy::main::config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user