rafl / puppet-perlbrew

Artistic License 2.0
17 stars 8 forks source link

/usr/local/bin/perlbrew no such file or directory #22

Open LLFourn opened 10 years ago

LLFourn commented 10 years ago

first time using this module on a fresh install I get:

Error: /usr/bin/env: /usr/local/bin/perlbrew: No such file or directory

Running puppet again everything works. Which means it's a dependency order issue.

 exec {
    'perlbrew_init':
      command => "/bin/sh -c 'umask 022; /usr/bin/env PERLBREW_ROOT=${perlbrew::params::perlbrew_root} ${perlbrew::params::perlbrew_bin} init'",
      creates => "${perlbrew::params::perlbrew_root}/perls",
      user    => 'perlbrew',
      group   => 'perlbrew',
      require => [ Group['perlbrew'], User['perlbrew'] ],
  }

The require should also have

File[$perlbrew::params::perlbrew_bin]

as part of the array. Puppet is pretty dumb sometimes. To reproduce:

node 'mah.cool.host' {
  class {'perlbrew':}
  perlbrew::build {"5.18.2":
    version => "5.18.2",
  }
}