thias / puppet-php

Puppet module to manage PHP
Other
49 stars 67 forks source link

Update module::ini to allow specifying RPM pkgname directly #21

Closed jeffsheltren closed 10 years ago

jeffsheltren commented 10 years ago

This changes the logic in module::ini so that calling classes can specify a package name directly without having to worry about what $phhp_package_name might be. This gives the ability to use this module for e.g. php53u from IUS without having to manually override params.pp.

I understand this isn't ideal as it changes functionality slightly, but I think it's worth it to make it a bit more flexible.

thias commented 10 years ago

Very good point. I think it could easily be improved with this, to avoid breaking instances where $pkgname is already being used :

  $rpmpkgname = $pkgname ? {
    false   => "${php::params::php_package_name}-${title}",
    /^php/  => "${pkgname}",
    default => "${php::params::php_package_name}-${pkgname}",
  }

What do you think? (or maybe I misunderstood your goal)

jeffsheltren commented 10 years ago

Good idea, I think that would work nicely.

Would you like me to push an updated commit to this branch?

thias commented 10 years ago

This has been included as 334a1dce14db5e9cb1b671a48c06b505b2edf702.