Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providers for FPM Pools etc #34

Open
khaefeli opened this issue Jun 2, 2014 · 1 comment
Open

Providers for FPM Pools etc #34

khaefeli opened this issue Jun 2, 2014 · 1 comment

Comments

@khaefeli
Copy link
Contributor

khaefeli commented Jun 2, 2014

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

@khaefeli
Copy link
Contributor Author

khaefeli commented Jun 3, 2014

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant