Puppet Class: st2::profile::python
- Inherits:
- st2
- Defined in:
- manifests/profile/python.pp
Summary
StackStorm compatable installation of Python and dependencies.Overview
include st2::profile::python
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'manifests/profile/python.pp', line 35
class st2::profile::python (
String $version = $st2::python_version,
Boolean $enable_unsafe_repo = $st2::python_enable_unsafe_repo,
) inherits st2 {
notice("Python version: ${version}")
if !defined(Class['python']) {
# if we're installing a custom version of Python on Ubuntu, then install the deadsnakes PPA
# but only if the user explicitly specified st2::python_enable_unsafe_repo: true
if $version != 'system' and $facts['os']['family'] == 'Debian' and $enable_unsafe_repo {
# enable the PPA
apt::ppa { 'ppa:deadsnakes/ppa':
before => Class['python'],
}
}
# intall python and python-devel / python-dev
class { 'python':
version => $version,
dev => present,
manage_pip_package => false,
}
}
}
|