-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathpython.pp
More file actions
36 lines (36 loc) · 1.14 KB
/
python.pp
File metadata and controls
36 lines (36 loc) · 1.14 KB
1
2
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
29
30
31
32
33
34
35
36
# @summary StackStorm compatable installation of Python and dependencies.
#
# @param [String] 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'.
#
# @example Basic Usage
# include st2::profile::python
#
# @example 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,
# }
# include st2::profile::python
#
class st2::profile::python (
String $version = $st2::python_version,
Boolean $python_use_epel_repo = $st2::python_use_epel_repo,
) 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,
use_epel => $python_use_epel_repo,
}
}
}