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

Examples:

Basic Usage

include st2::profile::python

Install with python 3.8 (if not default on your system)

$st2_python_version = $facts['os']['family'] ? {
  'RedHat' => '3.8',
  'Debian' => 'python3.8',
}
class { 'st2':
  python_version            => $st2_python_version,
}

Parameters:

  • version (String) (defaults to: $st2::python_version)

    Version of Python to install. Default is ‘system’ meaning the system version of Python will be used. To install Python 3.8 on RHEL/CentOS 7 specify ‘3.8’. To install Python 3.8 on Ubuntu 16.05 specify ‘python3.8’.



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'manifests/profile/python.pp', line 22

class st2::profile::python (
  String  $version            = $st2::python_version,
) inherits st2 {
  notice("Python version: ${version}")
  if !defined(Class['python']) {
    # intall python and python-devel / python-dev
    class { 'python':
      version            => $version,
      dev                => present,
      manage_pip_package => false,
    }
  }
}