This repository was archived by the owner on May 15, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,6 +257,25 @@ python::dotfile { '/var/lib/jenkins/.pip/pip.conf':
257257}
258258```
259259
260+ ### hiera configuration
261+
262+ This module supports configuration through hiera. The following example
263+ creates two python3 virtualenvs. The configuration also pip installs a
264+ package into each environment.
265+
266+ ``` yaml
267+ python::python_pyvenvs :
268+ " /opt/env1 " :
269+ version : " system"
270+ " /opt/env2 " :
271+ version : " system"
272+ python::python_pips :
273+ " nose " :
274+ virtualenv : " /opt/env1"
275+ " coverage " :
276+ virtualenv : " /opt/env2"
277+ ` ` `
278+
260279## Authors
261280
262281[Sergey Stankevich](https://github.com/stankevich)
Original file line number Diff line number Diff line change 6060 $manage_gunicorn = $python::params::manage_gunicorn,
6161 $provider = $python::params::provider,
6262 $valid_versions = $python::params::valid_versions,
63+ $python_pips = { },
64+ $python_virtualenvs = { },
65+ $python_pyvenvs = { },
6366) inherits python::params{
6467
6568 # validate inputs
9295 class { 'python::config' : } ->
9396 anchor { 'python::end' : }
9497
98+ # Allow hiera configuration of python resources
99+ create_resources(' python::pip' , $python_pips )
100+ create_resources(' python::pyvenv' , $python_pyvenvs )
101+ create_resources(' python::virtualenv' , $python_virtualenvs )
102+
95103}
You can’t perform that action at this time.
0 commit comments