Ask Your Question
0

I am getting following error while running puppet apply

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

shilpi gravatar image

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

DarylW gravatar image

output

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
1

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

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

Example:

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

Stats

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

Seen: 25 times

Last updated: Apr 10