From d6c8a035a6db4021be7755f75d9c176551921cb7 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Mon, 24 Feb 2025 12:02:24 +0100 Subject: [PATCH] add main module order --- manifests/main/config.pp | 2 +- manifests/main/dirs.pp | 23 +++++++++++++++++++++++ manifests/main/files.pp | 11 +++++++++++ manifests/main/install.pp | 2 +- manifests/main/service.pp | 11 +++++++++++ manifests/params.pp | 9 ++++++++- 6 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 manifests/main/dirs.pp create mode 100644 manifests/main/files.pp create mode 100644 manifests/main/service.pp diff --git a/manifests/main/config.pp b/manifests/main/config.pp index 89fb9c0..e435b10 100644 --- a/manifests/main/config.pp +++ b/manifests/main/config.pp @@ -6,6 +6,6 @@ class cd_alloy::main::config ( ) inherits cd_alloy::params { - include cd_alloy::main::install + include cd_alloy::main::service } diff --git a/manifests/main/dirs.pp b/manifests/main/dirs.pp new file mode 100644 index 0000000..5f213ca --- /dev/null +++ b/manifests/main/dirs.pp @@ -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, + } +} diff --git a/manifests/main/files.pp b/manifests/main/files.pp new file mode 100644 index 0000000..c4ed043 --- /dev/null +++ b/manifests/main/files.pp @@ -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 + +} diff --git a/manifests/main/install.pp b/manifests/main/install.pp index 7c9637b..d20a365 100644 --- a/manifests/main/install.pp +++ b/manifests/main/install.pp @@ -8,7 +8,7 @@ class cd_alloy::main::install ( require cd_alloy::main::yumrepo - package {$reqpackages: + package {$repackages: ensure => $pkg_ensure, } diff --git a/manifests/main/service.pp b/manifests/main/service.pp new file mode 100644 index 0000000..0709947 --- /dev/null +++ b/manifests/main/service.pp @@ -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 + +} diff --git a/manifests/params.pp b/manifests/params.pp index 9444e5d..14be952 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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