On 05/10/15 19:48, Henrik Lindberg wrote:
On 2015-05-10 8:51, Fabien Delpierre wrote:

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!


If you are using 3.x with parser=future, or 4.x you can do like this:

python::pip {
   default:
     install_args => ['-I'],
     proxy        => 'http://proxy.example.com:3128' ;

   "pbr":           ensure => '1.3.0' ;
   "linecached":    ensure => '1.0.0' ;
   "elasticsearch": ensure => '1.6.0' ;
}

The syntax below does the same on 3.x? Note the resource name capitalized.

Python::Pip {
    install_args => ['-I'],
    proxy        => 'http://proxy.example.com:3128',
}

https://docs.puppetlabs.com/puppet/3.8/reference/lang_defaults.html


--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/56144D0B.40503%40joaomorais.com.br.
For more options, visit https://groups.google.com/d/optout.

Reply via email to