Puppet Class: sentry::install::python

Defined in:
manifests/install/python.pp

Overview

Class: sentry::install::python



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
# File 'manifests/install/python.pp', line 3

class sentry::install::python
{
  $virtualenv_path = $sentry::install::virtualenv_path

  if $sentry::manage_python {
    class { '::python':
      dev        => true,
      pip        => true,
      virtualenv => true,
    } -> Package <| provider == 'pip' |>

    python::virtualenv { $virtualenv_path:
      ensure => present,
      owner  => $sentry::owner,
      group  => $sentry::group,
    }
  } else {
    exec { 'create_virtualenv':
      command => "virtualenv ${virtualenv_path}",
      creates => "${virtualenv_path}/bin/activate",
      user    => $sentry::owner,
      cwd     => $sentry::path,
      path    => '/usr/local/bin:/usr/bin',
    }
  }
}