puppet-barbican/lib/puppet/type/barbican_api_uwsgi_config.rb
Thomas Goirand 0edb3b1831 Add support for barbican_api_uwsgi_config in Debian
This patch is adding the configuration of the number of workers,
threads, and the size of the listen queue in Debian, which uses
uwsgi to run Nova API. Therefore, this patch adds a new
barbican_api_uwsgi_config provider as well as a new
barbican::wsgi::uwsgi class.

Change-Id: I3acdc3021e787ae1bc5e4ed3c464d530bfbde50a
2021-04-12 18:41:56 +02:00

30 lines
709 B
Ruby

Puppet::Type.newtype(:barbican_api_uwsgi_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/barbican/barbican-api-uwsgi.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
newvalues(/^[\S ]*$/)
end
newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end
autorequire(:anchor) do
['barbican::install::end']
end
end