Open khaefeli opened 10 years ago
for the moment I've created the class "php::fpm" (fpm.pp) and autoloading the hiera data:
class php::fpm (
#set defaults that php::fpm:config is loaded
$config = {},
) {
create_resources('php_fpm', $php::fpm::config)
define php_fpm(
$listen,
$user,
){
php::fpm::conf { $name:
listen => $listen,
user => $user,
}
}
}
hiera data:
php::fpm::config:
"pool1":
"listen": "127.0.0.1:9001"
"user": "www-data"
"pool2":
"listen": "127.0.0.1:9002"
"user": "someuser"
Hi,
did you think about providers for FPM pools and other configurations?
Like they do:
https://forge.puppetlabs.com/puppetlabs/mysql#mysql_user https://forge.puppetlabs.com/jfryman/nginx (hiera support)
the advantage is, that everybody could easily create pools etc over hiera data without a "wrapper" module / modify this modules core.
(maybe I could create a PR)
cheers