Ask Your Question
0

Run newman run on ubuntu from puppet agent

asked 2017-02-03 11:16:54 -0500

sanjay gravatar image

updated 2017-02-06 08:06:41 -0500

DarylW gravatar image

Folks, I have following in my PE master in suite.pp file, final goal is to run newman, but I am just trying command 'ls' currently but it fails

exec { 'newman run':              
    # (namevar) The command to execute  
    command  => 'ls',                
    path    => '/home/user/Downloads/f5-postman-workflows-develop/framework',
}

when I run on puupet agent it gives me error

root@ubuntu-agent:~# sudo puppet  agent -t
Info: Using configured environment 'production'                   
Info: Retrieving pluginfacts                
Info: Retrieving plugin              
Info: Loading facts                
Info: Caching catalog for ubuntu-desktop
Info: Applying configuration version '1486141942'            
Error: Could not find command 'ls'              
Error: /Stage[main]/Main/Node[ubuntu-agent]/Exec[newman run]/returns: change from notrun to 0 failed: Could not find command 'ls'
Notice: Applied catalog in 1.29 seconds 
root@ubuntu-agent:~#
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-09 14:14:10 -0500

puser gravatar image

commands must be fully qualified when using exec.

You need to use like

exec { 'newman_run':               
    command  => '/bin/ls',                
    path    => '/home/user/Downloads/f5-postman-workflows-develop/framework',
}

in order for puppet to know where your command is to run.

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-02-03 11:16:54 -0500

Seen: 50 times

Last updated: Feb 09