From dff80434147447015519464c02f0bff5acbce5a1 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Wed, 26 Feb 2025 01:55:17 +0100 Subject: [PATCH] add class chain --- manifests/main/dirs.pp | 12 ++++++++++++ manifests/main/files.pp | 20 ++++++++++++++++++++ manifests/main/install.pp | 20 ++++++++++++++++++++ manifests/main/yumrepo.pp | 12 ++++++++++++ manifests/server/service.pp | 1 + 5 files changed, 65 insertions(+) create mode 100644 manifests/main/dirs.pp create mode 100644 manifests/main/files.pp create mode 100644 manifests/main/install.pp create mode 100644 manifests/main/yumrepo.pp diff --git a/manifests/main/dirs.pp b/manifests/main/dirs.pp new file mode 100644 index 0000000..5af3429 --- /dev/null +++ b/manifests/main/dirs.pp @@ -0,0 +1,12 @@ +## puppet_cd::main::dirs.pp +# Module name: puppet_cd +# Author: Arne Teuke (arne_teuke@confdroid) +# @summary Class manages directories for the puppet_cd module. +############################################################################### +class puppet_cd::main::dirs ( + +) inherits puppet_cd::params { + + include puppet_cd::main::install + +} diff --git a/manifests/main/files.pp b/manifests/main/files.pp new file mode 100644 index 0000000..6b5f539 --- /dev/null +++ b/manifests/main/files.pp @@ -0,0 +1,20 @@ +## puppet_cd::main::files.pp +# Module name: puppet_cd +# Author: Arne Teuke (arne_teuke@confdroid) +# @summary Class manages config files for the puppet_cd module. +############################################################################### +class puppet_cd::main::files ( + +) inherits puppet_cd::params { + + include puppet_cd::main::dirs + + if $fqdn == $pt_puppetmaster { + # server files + } + + if $fqdn != $pt_puppetmaster { + # client files + } + +} diff --git a/manifests/main/install.pp b/manifests/main/install.pp new file mode 100644 index 0000000..ff4dee4 --- /dev/null +++ b/manifests/main/install.pp @@ -0,0 +1,20 @@ +## puppet_cd::main::install.pp +# Module name: puppet_cd +# Author: Arne Teuke (arne_teuke@confdroid) +# @summary Class manages package installation for the puppet_cd module. +############################################################################### +class puppet_cd::main::install ( + +) inherits puppet_cd::params { + + require puppet_cd::main::yumrepo + + if $fqdn == $pt_puppetmaster { + # install server packages + } + + if $fqdn != $pt_puppetmaster { + # install agent packages + } + +} diff --git a/manifests/main/yumrepo.pp b/manifests/main/yumrepo.pp new file mode 100644 index 0000000..b146643 --- /dev/null +++ b/manifests/main/yumrepo.pp @@ -0,0 +1,12 @@ +## puppet_cd::main::yumrepo.pp +# Module name: puppet_cd +# Author: Arne Teuke (arne_teuke@confdroid) +# @summary Class manages yum repos for the puppet_cd module. +############################################################################### +class puppet_cd::main::yumrepo ( + +) inherits puppet_cd::params { + + + +} diff --git a/manifests/server/service.pp b/manifests/server/service.pp index a0f335d..2a4991b 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -10,6 +10,7 @@ class puppet_cd::server::service ( if $fqdn == $pt_puppetmaster { include puppet_cd::firewall::iptables + include puppet_cd::main::files # manage puppet server service