# modules/frankenphp/manifests/config.pp class frankenphp::config ( $caddyfile_path = $frankenphp::params::caddyfile_path, $service_name = $frankenphp::params::service_name, $php_wrapper = $frankenphp::params::php_wrapper, ) 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 } # Install php wrapper if $php_wrapper { file { '/usr/local/bin/php': owner => 'root', group => 'root', mode => '0755', source => 'puppet:///modules/frankenphp/php-wrapper.sh', } } }