forked from rvdh/puppet-uwsgi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.pp
More file actions
49 lines (48 loc) · 1.27 KB
/
app.pp
File metadata and controls
49 lines (48 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# == Define: uwsgi::app
#
# Responsible for creating uwsgi applications. You shouldn't need to use this
# type directly, as the main `uwsgi` class uses this type internally.
#
# === Parameters
#
# [*ensure*]
# Ensure the config file exists. Default: 'present'
#
# [*template*]
# The template used to construct the config file.
# Default: 'uwsgi/uwsgi_app.ini.erb'
#
# [*uid*]
# The user to run the application as. Required.
# May be the user name, not just the id.
#
# [*gid*]
# The group to run the application as. Required.
# May be the group name, not just the id.
#
# [*application_options*]
# Extra options to set in the application config file
#
# [*environment_variables*]
# Extra environment variables to set in the application config file
#
# === Authors
# - Josh Smeaton <josh.smeaton@gmail.com>
#
define uwsgi::app (
$ensure = 'present',
$template = 'uwsgi/uwsgi_app.ini.erb',
$application_options = undef,
$environment_variables = undef,
$uid,
$gid
) {
file { "${::uwsgi::app_directory}/${title}.ini":
ensure => $ensure,
owner => $uid,
group => $gid,
mode => '0644',
content => template($template),
require => Package[$::uwsgi::package_name]
}
}