add main module order

This commit is contained in:
Arne Teuke
2025-02-24 12:02:24 +01:00
parent e88d926ee1
commit d6c8a035a6
6 changed files with 55 additions and 3 deletions

View File

@@ -6,6 +6,6 @@ class cd_alloy::main::config (
) inherits cd_alloy::params {
include cd_alloy::main::install
include cd_alloy::main::service
}

23
manifests/main/dirs.pp Normal file
View File

@@ -0,0 +1,23 @@
Module name: cd_alloy
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages required directories for the cd_alloy module
###############################################################################
class cd_alloy::main::dirs (
) inherits cd_alloy::params {
require cd_alloy::main::install
# main config dir
file { $ay_main_dir:
ensure => directory,
path => $ay_main_dir,
owner => 'root',
group => 'root',
mode => '0770',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
}
}

11
manifests/main/files.pp Normal file
View File

@@ -0,0 +1,11 @@
Module name: cd_alloy
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages required config files for the cd_alloy module
###############################################################################
class cd_alloy::main::files (
) inherits cd_alloy::params {
require cd_alloy::main::dirs
}

View File

@@ -8,7 +8,7 @@ class cd_alloy::main::install (
require cd_alloy::main::yumrepo
package {$reqpackages:
package {$repackages:
ensure => $pkg_ensure,
}

11
manifests/main/service.pp Normal file
View File

@@ -0,0 +1,11 @@
Module name: cd_alloy
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages the alloy service
###############################################################################
class cd_alloy::main::service (
) inherits cd_alloy::params {
require cd_alloy::main::files
}

View File

@@ -1,7 +1,7 @@
## cd_alloy::params.pp
# Module name: cd_alloy
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @param [string] reqpackages which packages to install
# @param [string] repackages which packages to install
# @param [string] pkg_ensure 'latest' or 'present'
# @summary Class contains all parameters for the cd_alloy module.
##############################################################################
@@ -12,6 +12,13 @@ $pkg_ensure = 'latest',
) {
# service
$ay_service = 'alloy'
# dirs
$ay_main_dir = '/etc/alloy'
# includes must be last
include cd_alloy::main::config