From c64fda634f8609c54196a6223f1e67fb3e0fddc3 Mon Sep 17 00:00:00 2001 From: Hendrik Jäger Date: Sun, 22 May 2022 11:37:38 +0200 Subject: refactor for saner notifications --- manifests/config.pp | 22 ---------------------- manifests/init.pp | 9 +++------ manifests/install.pp | 2 ++ manifests/logrotater.pp | 16 ++++++++++++++++ manifests/scandir_users.pp | 7 +++++++ 5 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 manifests/config.pp create mode 100644 manifests/logrotater.pp create mode 100644 manifests/scandir_users.pp (limited to 'manifests') diff --git a/manifests/config.pp b/manifests/config.pp deleted file mode 100644 index 3431ef8..0000000 --- a/manifests/config.pp +++ /dev/null @@ -1,22 +0,0 @@ -class s6::config { - $basedir = '/etc/s6-services/s6-logrotater' - - file { - $basedir: - ensure => directory, - mode => '0600', - ; - - "${basedir}/run": - ensure => present, - content => epp("s6/${basedir}/run.epp"), - mode => '0700', - ; - } - - $s6::scandir_users.each | $entry | { - s6::user_scandir { - $entry: ; - } - } -} diff --git a/manifests/init.pp b/manifests/init.pp index 833fd8c..cf1c5db 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,12 +4,9 @@ class s6 ( require 'execline' class { - "${name}::install": - notify => Class["${name}::service"], - ; - "${name}::config": - notify => Class["${name}::service"], - ; + "${name}::install": ; + "${name}::scandir_users": ; + "${name}::logrotater": ; "${name}::service": ; } } diff --git a/manifests/install.pp b/manifests/install.pp index b6f80b4..9609076 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -13,12 +13,14 @@ class s6::install { ], mode => '0755', require => Package['s6'], + notify => Class['s6::service'], ; '/etc/init.d/s6': ensure => present, source => 'puppet:///modules/s6/etc/init.d/s6', mode => '0755', require => Package['s6'], + notify => Class['s6::service'], ; '/etc/s6-services/': ensure => directory, diff --git a/manifests/logrotater.pp b/manifests/logrotater.pp new file mode 100644 index 0000000..a864241 --- /dev/null +++ b/manifests/logrotater.pp @@ -0,0 +1,16 @@ +class s6::logrotater { + $basedir = '/etc/s6-services/s6-logrotater' + + file { + $basedir: + ensure => directory, + mode => '0600', + ; + + "${basedir}/run": + ensure => present, + content => epp("s6/${basedir}/run.epp"), + mode => '0700', + ; + } +} diff --git a/manifests/scandir_users.pp b/manifests/scandir_users.pp new file mode 100644 index 0000000..30734ce --- /dev/null +++ b/manifests/scandir_users.pp @@ -0,0 +1,7 @@ +class s6::scandir_users { + $s6::scandir_users.each | $entry | { + s6::user_scandir { + $entry: ; + } + } +} -- cgit v1.2.3