example42 / puppet-php

A puppet module for php. According to Example42 NextGen spec.
Other
45 stars 62 forks source link

php::augeas writes to php.ini before php package is installed #85

Closed catalinpan closed 9 years ago

catalinpan commented 9 years ago

Hi,

On the initial puppet run php::augeas writes the values on the php.ini before the php package installation. This results in the php.ini having only the php::augeas values.

As a "fix" I have added require => Package['php'] on the augeas.pp:

                 $changes = $ensure ? {
                           present => [ "set '${entry}' '${value}'" ],
                           absent  => [ "rm '${entry}'" ],
                           require => Package['php'],
                                       }

                 augeas { "php_ini-${name}":
                           incl    => $target,
                           lens    => 'Php.lns',
                           changes => $changes,
                           require => Package['php'],
                                      }

and now works as expected.

I am wondering, how can I change the behaviour without modifying the module or creating a wrapper class?

Thanks

alvagante commented 9 years ago

I consider this a bug, please send a PR with the fix you found

catalinpan commented 9 years ago

I have done the PR. Thanks.