Hey folks,
I have something like this in a manifest:

class foo(
  $python_pips   = {
    pbr => { ensure => '1.3.0', install_args => ['-I'] },
    linecache2 => { ensure => '1.0.0', install_args => ['-I'] },
    elasticsearch => { ensure => '1.6.0', install_args => ['-I'] },
  },
  ) {
  require python
  create_resources('python::pip', $python_pips)
}

I'm using this module: https://github.com/stankevich/puppet-python

I'm wondering if there's a more elegant way of telling the python::pip 
resource to use the -I flag when installing those three pip packages.
It's going to get even uglier since the $python_pips variable will 
ultimately live in Hiera, and I have some environments that require a proxy 
to access the Internet, so in Hiera for those environments it's going to 
look like this:

foo::python_pips:
  "pbr":
    ensure: 1.3.0
    install_args: ['-I']
    proxy: 'http://proxy.example.com:3128";
  "linecache2":
    ensure: 1.0.0
    install_args: ['-I']
    proxy: "http://proxy.example.com:3128";
  "elasticsearch":
    ensure: 1.6.0
    install_args: ['-I']
    proxy: "http://proxy.example.com:3128";

I don't like all this repetition. Wanted to double check if I can make this 
easier on the eyes before I move on. 
I appreciate any input!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/aa823d3e-71bd-4cba-887c-d044656d945a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to