puppet-keystone/manifests/wsgi/uwsgi.pp
Takashi Kajinami 486d7f1435 Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ie757167eedce6fa1c99d08f96be1173871f21817
2023-03-02 12:24:38 +09:00

42 lines
933 B
Puppet

#
# Copyright 2021 Thomas Goirand <zigo@debian.org>
#
# Author: Thomas Goirand <zigo@debian.org>
#
# == Class: keystone::wsgi::uwsgi
#
# Configure the UWSGI service for Keystone.
#
# == Parameters
#
# [*processes*]
# (Optional) Number of processes.
# Defaults to $facts['os_workers'].
#
# [*threads*]
# (Optional) Number of threads.
# Defaults to 32.
#
# [*listen_queue_size*]
# (Optional) Socket listen queue size.
# Defaults to 100
#
class keystone::wsgi::uwsgi (
$processes = $facts['os_workers'],
$threads = 32,
$listen_queue_size = 100,
){
include keystone::deps
if $facts['os']['name'] != 'Debian'{
warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.')
}
keystone_uwsgi_config {
'uwsgi/processes': value => $processes;
'uwsgi/threads': value => $threads;
'uwsgi/listen': value => $listen_queue_size;
}
}