Puppet Class: python::config

Defined in:
manifests/config.pp

Summary

Optionally installs the gunicorn service

Overview

Examples:

include python::config


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'manifests/config.pp', line 7

class python::config {
  Class['python::install'] -> Python::Pip <| |>
  Class['python::install'] -> Python::Requirements <| |>

  if $python::manage_gunicorn {
    unless $python::gunicorn == 'absent' {
      Class['python::install'] -> Python::Gunicorn <| |>

      Python::Gunicorn <| |> ~> Service['gunicorn']

      service { 'gunicorn':
        ensure     => running,
        enable     => true,
        hasrestart => true,
        hasstatus  => false,
        pattern    => '/usr/bin/gunicorn',
      }
    }
  }
}