Ask Your Question

I am getting following error while running puppet apply

asked 2017-04-07 05:45:10 -0500

shilpi gravatar image

updated 2017-04-10 09:04:51 -0500

DarylW gravatar image


Error: Validation of Exec[extract_tomcat] failed: 'gunzip  apache-tomcat.tar.gz' is not qualified and no path was specified. Please qualify the command or specify a path. at /opt/SP/jboss/home/.puppetlabs/etc/code/environments/shilpi/modules/tomcatbe/manifests/init.pp:57

Following is the init.pp file:

 class tomcatbe {

file {'/opt/SP/apps/tomcatbe/apache-tomcat.tar.gz':
                ensure => 'present',
                source => '/var/SP/data/puppet/fileserver_data/tomcatbe/apache-tomcat.tar.gz',
                owner => 'jboss',
                group => 'jboss',
                mode  => '750',
                before => Exec['extract_tomcat'],


exec {'extract_tomcat':
        cwd => '/opt/SP/apps/tomcatbe/',
        command => 'gunzip  apache-tomcat.tar.gz',
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-07 11:17:48 -0500

Add a path to the exec resource to specify where it should run the command.


exec {'extract_tomcat': 
    cwd => '/opt/SP/apps/tomcatbe/', 
    command => 'gunzip apache-tomcat.tar.gz', 
    path        => ['/usr/bin', '/usr/sbin'],

} }

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-04-07 05:45:10 -0500

Seen: 23 times

Last updated: Apr 10