0

Seeing the following error in Puppet 4

# /opt/puppetlabs/bin/puppet agent --verbose --no-daemonize --onetime
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for aus-lnaswgp-002.wiley.com
Error: Failed to apply catalog: Parameter unless failed on Exec[sh /home/agile/svncheckout.sh]: 'test -f /home/agile/subversion.done' is not qualified and no path was specified. Please qualify the command or specify a path. at /apps/wps/puppetlabs/code/environments/production/manifests/classes/subversion.pp:17

Code is as follows:

      # cat /apps/wps/puppetlabs/code/environments/production/manifests/classes/subversion.pp

class subversion {
# A package for subversion install and necessary svn checkouts for user agile

package {'subversion':
    ensure => installed,
}

file {'/home/agile/svncheckout.sh':
  ensure => present,
  group => agile,
  mode => "755",
  source => "puppet://puppet/scripts/svncheckout.sh",
  require => [ Package['subversion'], Class['user_default'] ],
  before => [Class['apache1'], Class['activemq'], Class['luciddb'], Class['sybase']],
}

Looks like the script is not able to copy svncheckout.sh from puppet/scripts/svncheckout.sh . Any suggestion how to resolve the above error ?

Zama Ques
  • 523
  • 1
  • 9
  • 24
  • Looks like you asked the same question twice: http://serverfault.com/questions/790988/migrating-puppet-code-to-puppet-4-issue-with-classes – bodgit Jul 22 '16 at 15:00
  • The failure is because of two reasons.. One is full path required you pointed out . after that is resolved there was the issue of invalid module directory structure.. Thanks – Zama Ques Jul 23 '16 at 09:04

1 Answers1

1

The code snippet you posted has nothing to do with the error being output.

The error is saying that you need to qualify the path of the unless command, so test becomes /usr/bin/test (or wherever the test binary is installed on your system).

Use the which test command to find the full path to the file, and edit your code accordingly.

Craig Watson
  • 9,575
  • 3
  • 32
  • 47