summaryrefslogtreecommitdiff
path: root/manifests/emperor.pp
blob: d1adbb75b6768a92c793a596470c52ea05b1bce6 (plain)
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
class uwsgi::emperor (
  String $path = '/etc/uwsgi/vassals',
  Optional[String] $listen = undef,
) {

  include ::uwsgi::package

  file { $path:
    ensure => directory,
  }

  file { '/etc/uwsgi/emperor.ini':
    content => epp("${module_name}/emperor.ini.epp"),
  }

  if $listen != undef {
    systemd::dropin_file { 'emperor.uwsgi.socket':
      content => @("EOF")
      ListenStream=
      ListenStream=${listen}
      | EOF
    }
  }

  service { 'emperor.uwsgi.socket':
    ensure => running,
    enable => true,
  }
}