thias / puppet-php

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

Dependency issue #73

Open joshuaspence opened 9 years ago

joshuaspence commented 9 years ago

I am getting the following error when trying to use this module to install php5-cli:

/Stage[main]/Php::Ini[/etc/php5/cli/php.ini]/File[/etc/php5/cli/php.ini]/ensure) change from absent to file failed: Could not set 'file on ensure: cannot generate tempfile `/etc/php5/cli/php.ini20150831-7938-1j2ducm-9' at /etc/puppet/ext_modules/php/manifests/ini.pp:117

The puppet code is as follows:

class { '::php::cli':
  ensure  => 'latest',
  inifile => '/etc/php5/cli/php.ini',
}

php::ini { '/etc/php5/cli/php.ini':
  // ...
}

The issue seems to be that Package['php5-cli'] depends on File['/etc/php5/cli/php.ini'], which does not exist before the php5-cli package is installed. I actually think that this dependency should be inverted (i.e. that File['/etc/php5/cli/php.ini'] should depend on Package['php5-cli']).

thias commented 9 years ago

Could you create a pull request with what works for you, so that I can review it?