diff --git a/manifests/instance.pp b/manifests/instance.pp --- a/manifests/instance.pp +++ b/manifests/instance.pp @@ -26,7 +26,7 @@ # executable => 'foo.wsgi:app' # user => 'foouser', # group => 'foogroup', -# config_mode => 0644 +# config_mode => 0644, # settings => { # plugin => 'python3', # protocol => $uwsgi_protocol, @@ -58,6 +58,7 @@ $ensure = 'enabled', $config_mode = '0644', $working_dir = undef, + $config_base_module = undef, $log_only_errors = true, $settings = {}, $environment = {} @@ -90,6 +91,7 @@ # - $settings # - $name # - $log_only_errors_str + # - $config_base_module file {$config_file: ensure => present, owner => $user, diff --git a/templates/gunicorn-instance.cfg.erb b/templates/gunicorn-instance.cfg.erb --- a/templates/gunicorn-instance.cfg.erb +++ b/templates/gunicorn-instance.cfg.erb @@ -1,6 +1,11 @@ # Gunicorn instance configuration. # Managed by puppet (class gunicorn::instance <%= @name %>); changes will be lost +<%- if @config_base_module -%> +# import all settings from the base module +from <%= @config_base_module %> import * +<%- end -%> + import traceback import gunicorn.glogging