example42 / puppet-php

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

Php::Pear::Config[auto_discover] is already declared #17

Closed chrisns closed 11 years ago

chrisns commented 11 years ago

Duplicate declaration: Php::Pear::Config[auto_discover] is already declared in file /tmp/vagrant-puppet/modules-0/php/manifests/pear/module.pp at line 62; cannot redeclare at /tmp/vagrant-puppet/modules-0/php/manifests/pear/module.pp:62 on node precise64.wag320n

with a config file having:

php::pear::module { 'PHPUnit':
use_package => false,
repository => 'pear.phpunit.de',
}
php::pear::module { 'PHPUnit_Selenium':
use_package => false,
repository => 'pear.phpunit.de',
}

removing


      if $repository != 'pear.php.net' {
        @php::pear::config { 'auto_discover':
          value => '1',
          before => Exec["pear-${name}"],
        }
        Php::Pear::Config <| title == 'auto_discover' |>
      }

fixes this?

lucadegasperi commented 11 years ago

Have the same issue here. how can this be fixed? should the '@' prevent the double declaration?

alvagante commented 11 years ago

5d815a4faba41fad82ab82fb8cb582ccad001629 should fix the duplicated declaration issue.

Note that there are still issues for the specific installation of the packages, the complete code would be something like: class { 'php': } php::module {'xml': service_autorestart => false, # This is required if don't install what's referred by the 'service' parameter (default apache) } php::pear::module { 'PHPUnit': use_package => false, repository => 'pear.phpunit.de', } php::pear::module { 'PHPUnit_Selenium': use_package => false, repository => 'pear.phpunit.de', }