From 6695957284364e91c83f013086dd6aaa7b9efb4f Mon Sep 17 00:00:00 2001 From: Hendrik Jäger Date: Wed, 20 Apr 2022 14:06:19 +0200 Subject: initial --- manifests/init.pp | 10 ++++++++++ manifests/install.pp | 32 ++++++++++++++++++++++++++++++++ manifests/service.pp | 8 ++++++++ 3 files changed, 50 insertions(+) create mode 100644 manifests/init.pp create mode 100644 manifests/install.pp create mode 100644 manifests/service.pp (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..cd36656 --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,10 @@ +class s6 { + require 'execline' + + class { + "${name}::install": + notify => Class["${name}::service"], + ; + "${name}::service": ; + } +} diff --git a/manifests/install.pp b/manifests/install.pp new file mode 100644 index 0000000..de016ee --- /dev/null +++ b/manifests/install.pp @@ -0,0 +1,32 @@ +class s6::install { + package { + 's6': + ensure => installed, + ; + } + file { + '/usr/local/bin/s6-svscanboot': + ensure => present, + source => 'puppet:///modules/s6/usr/local/bin/s6-svscanboot', + mode => '0755', + require => Package['s6'], + ; + '/etc/init.d/s6': + ensure => present, + source => 'puppet:///modules/s6/etc/init.d/s6', + mode => '0755', + require => Package['s6'], + ; + '/etc/s6-services/': + ensure => directory, + ; + } + user { + 's6-logs': + ensure => present, + home => '/nonexistant', + shell => '/usr/sbin/nologin', + system => true, + ; + } +} diff --git a/manifests/service.pp b/manifests/service.pp new file mode 100644 index 0000000..0e90664 --- /dev/null +++ b/manifests/service.pp @@ -0,0 +1,8 @@ +class s6::service { + service { + 's6': + ensure => running, + enable => true, + ; + } +} -- cgit v1.2.3