summaryrefslogtreecommitdiff
path: root/manifests/setup.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-04-24 17:05:29 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-04-24 17:05:29 +0200
commit538b7ff0c8125a3f412154807e3425127968448f (patch)
treed998b3c00dc019a6ed16625b72a682c10708a5b0 /manifests/setup.pp
parentInitial commit. (diff)
downloadgunicorn-538b7ff0c8125a3f412154807e3425127968448f.tar.gz
gunicorn-538b7ff0c8125a3f412154807e3425127968448f.tar.xz
Add everything.
Diffstat (limited to '')
-rw-r--r--manifests/setup.pp34
1 files changed, 34 insertions, 0 deletions
diff --git a/manifests/setup.pp b/manifests/setup.pp
new file mode 100644
index 0000000..aebfe46
--- /dev/null
+++ b/manifests/setup.pp
@@ -0,0 +1,34 @@
+# @summary General configuration of gunicorn
+#
+# @param package_name
+# Name of system package
+# @param instance_dir
+# Where instance configuration files should be plced
+# Should currently not be changed, since it's hard-coded in the
+# service file.
+# @param user
+# Default user to use for each instance.
+# @param group
+# Default group to use for each instance.
+class gunicorn::setup (
+ String $package_name = 'gunicorn',
+ String $instance_dir = '/var/lib/gunicorn',
+ Variant[String, Integer] $user = 'gunicorn',
+ Variant[String, Integer] $group = 'gunicorn',
+) {
+ ensure_packages([
+ $package_name,
+ ])
+
+ # python-setproctitle
+
+ file { $instance_dir:
+ ensure => directory,
+ }
+
+ systemd::unit_file { 'gunicorn@.service':
+ source => "puppet:///modules/${module_name}/gunicorn@.service",
+ enable => false,
+ active => false,
+ }
+}