From 6211588b6db612d25b4f1a4bc62be7094d43b7a0 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Mon, 2 Jun 2025 16:41:08 +0200 Subject: [PATCH] add installation section --- manifests/main/config.pp | 10 ++++++++++ manifests/main/install.pp | 12 ++++++++++++ manifests/params.pp | 8 +++++++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 manifests/main/config.pp create mode 100644 manifests/main/install.pp diff --git a/manifests/main/config.pp b/manifests/main/config.pp new file mode 100644 index 0000000..bb6e449 --- /dev/null +++ b/manifests/main/config.pp @@ -0,0 +1,10 @@ +## automatic_cd::config.pp +# Module name: automatic_cd +# Author: Arne Teuke (arne_teuke@confdroid.com) +# @summary Class manages module logic for the automatic_cd module +############################################################################## +class automatic_cd::config ( + +) inherits automatic_cd::params { + include automatic_cd::main::install +} diff --git a/manifests/main/install.pp b/manifests/main/install.pp new file mode 100644 index 0000000..039f2ef --- /dev/null +++ b/manifests/main/install.pp @@ -0,0 +1,12 @@ +## automatic_cd::install.pp +# Module name: automatic_cd +# Author: Arne Teuke (arne_teuke@confdroid.com) +# @summary Class manages installation section for the automatic_cd module +############################################################################## +class automatic_cd::install ( + +) inherits automatic_cd::params { + package { $reqpackages: + ensure => $pkg_ensure, + } +} diff --git a/manifests/params.pp b/manifests/params.pp index 929e4de..1269fdb 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -2,9 +2,15 @@ # Module name: automatic_cd # Author: Arne Teuke (arne_teuke@confdroid.com) # @summary Class manages all parameters for the automatic_cd module +# @param [String] reqpackages which packages to install +# @param [String] pkg_ensure which version of packages to install ############################################################################## class automatic_cd::params ( + String $reqpackages = 'dnf-automatic', + String $pkg_ensure = 'latest', + ) { -# +# includes must be last + include automatic_cd::main::config }