summaryrefslogtreecommitdiff
path: root/manifests/vassal.pp
blob: 271147d901875df83b7b4cd71bd838fedb04829f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
define uwsgi::vassal (
  String $path,
  String $vassal_name = $name,
  # https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files
  Enum['ini', 'xml', 'json', 'yaml'] $type = stdlib::extname($path), # TODO strip leading period, and handle empty string
  Enum['present', 'absent'] $ensure = 'present',
) {
  include ::uwsgi::emperor
  file { "${uwsgi::emperor::path}/${name}.${type}":
    ensure => $ensure ? { 'present' => 'link', 'absent' => 'absent' },
    target => $path,
  }
}