39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# File 'manifests/init.pp', line 39
class python (
Python::Package::Ensure $ensure = $python::params::ensure,
Python::Version $version = '3',
Python::Package::Ensure $pip = $python::params::pip,
Python::Package::Ensure $dev = $python::params::dev,
Python::Package::Ensure $venv = $python::params::venv,
Python::Package::Ensure $gunicorn = $python::params::gunicorn,
Boolean $manage_gunicorn = $python::params::manage_gunicorn,
Boolean $manage_python_package = $python::params::manage_python_package,
Boolean $manage_venv_package = $python::params::manage_venv_package,
Boolean $manage_pip_package = $python::params::manage_pip_package,
String[1] $gunicorn_package_name = $python::params::gunicorn_package_name,
Optional[Python::Provider] $provider = $python::params::provider,
Hash $python_pips = {},
Hash $python_pyvenvs = {},
Hash $python_requirements = {},
Hash $python_dotfiles = {},
Boolean $use_epel = $python::params::use_epel,
Boolean $rhscl_use_public_repository = $python::params::rhscl_use_public_repository,
Stdlib::Httpurl $anaconda_installer_url = $python::params::anaconda_installer_url,
Stdlib::Absolutepath $anaconda_install_path = $python::params::anaconda_install_path,
Boolean $manage_scl = $python::params::manage_scl,
Optional[Python::Umask] $umask = undef,
) inherits python::params {
$exec_prefix = $provider ? {
'scl' => "/usr/bin/scl enable ${version} -- ",
'rhscl' => "/usr/bin/scl enable ${version} -- ",
default => '',
}
contain python::install
contain python::config
Class['python::install']
-> Class['python::config']
# Set default umask.
exec { default:
umask => $umask,
}
# Allow hiera configuration of python resources
create_resources('python::pip', $python_pips)
create_resources('python::pyvenv', $python_pyvenvs)
create_resources('python::requirements', $python_requirements)
create_resources('python::dotfile', $python_dotfiles)
}
|