Initial commit
This commit is contained in:
36
manifests/config.pp
Normal file
36
manifests/config.pp
Normal file
@@ -0,0 +1,36 @@
|
||||
# modules/frankenphp/manifests/config.pp
|
||||
|
||||
class frankenphp::config (
|
||||
$caddyfile_path = $frankenphp::params::caddyfile_path,
|
||||
$service_name = $frankenphp::params::service_name,
|
||||
) inherits frankenphp::params {
|
||||
|
||||
$caddyfile_dir = dirname($caddyfile_path)
|
||||
ensure_resource('file', $caddyfile_dir, {
|
||||
ensure => 'directory',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
})
|
||||
|
||||
concat { $caddyfile_path:
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
notify => Service[$service_name],
|
||||
require => File[$caddyfile_dir],
|
||||
}
|
||||
|
||||
concat::fragment { 'caddyfile-global-options':
|
||||
target => $caddyfile_path,
|
||||
order => '01',
|
||||
content => @(EOT)
|
||||
# Options globales Caddy (email, etc.)
|
||||
# {
|
||||
# admin off
|
||||
# email admin@example.com
|
||||
# }
|
||||
|
||||
EOT
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user