37 lines
837 B
Puppet
37 lines
837 B
Puppet
# 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
|
|
}
|
|
}
|