Hi Gerdo,

You are on the right track using a define but the problem is one of scope.
The version parameter for your define will only get set once in your
php::params class because classes are almost singletons in puppet (as in
they can exist only once for a node no matter how many times you call them).
You will have to set the configure parameters inside your define which will
be ugly I know but there isn't any other way around it.
I haven't used them but inline templates may help alleviate the ugliness.
I would also recommend splitting your define out into a separate file so
it's easier to maintain.

Hope that helps.

Pete.



On 20 February 2013 09:04, <ge...@timble.net> wrote:

> Hi,
>
> I'm working on a module and run into an issue. I would like to install
> multiple PHP versions from source. I know the preferred way is packages,
> but I don't want to maintain a custom APT repository. I have two files:
> install.pp which does the installation (download, extract, configure, make,
> make install) and params.pp which provides parameters.
>
> https://gist.github.com/gergoerdosi/4990967
> https://gist.github.com/gergoerdosi/4991012
>
> The first call to php::install::source { '5.3.21': } runs fine, however
> when it reaches php::install::source { '5.4.11': }, it downloads 5.3.21
> again instead 5.4.11. This is happening because the $url uses $version in
> params.pp, which doesn't get updated on the second call. This an expected
> behavior, but I don't know how else could I do it. What I want to do is to
> provide parameters for the different PHP versions (different URL, configure
> options etc). Any idea? My Puppet version is 2.7.19.
>
> Gergo Erdosi
>
> --
> 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 post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to