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

  include ::uwsgi::package

  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,
  }
}