Ask Your Question

returned 100 instead of one of [0]

asked 2017-11-16 10:27:03 -0500

manoharreddyg gravatar image

Hi, While i am running puppet i am getting the following error err: /Stage[main]/applicationsetup/Exec[pacakge-name]/returns: change from notrun to 0 failed: sudo apt-get -y --allow-unauthenticated --force-yes install <pacakge-name> returned 100 instead of one of [0] at /etc/puppet/manifests/classes/applicationsetup.pp:10 My puppet config

class applicationsetup {

exec { "package-install":
    command => "sudo apt-get -y --allow-unauthenticated --force-yes install <packge-name>",
   path => "/usr/bin",
    path => ['/usr/bin', '/bin', '/sbin'],
    logoutput => true,
    tries => 3,
    timeout => 3000,


edit retag flag offensive close merge delete


So what's your question? This is an application error, not Puppet's fault. Try debugging it on scene.

Kai Burghardt gravatar imageKai Burghardt ( 2017-11-16 12:04:12 -0500 )edit

I agree with Kai, Try to run the command manually on the node (sudo apt-get -y --allow-unauthenticated --force-yes install <package-name>) and check/debug the result. BTW, is there any reason for not using the package resource type (instead of exec)?

stivesso gravatar imagestivesso ( 2017-11-17 01:54:56 -0500 )edit

I guess the reason is `--allow-unauthenticated`.

Kai Burghardt gravatar imageKai Burghardt ( 2017-11-17 15:33:27 -0500 )edit

I think the install_options attribute of a Package resource should help to add --allow-unauthenticated .

stivesso gravatar imagestivesso ( 2017-11-18 05:22:06 -0500 )edit

@Kai- I tested and this is not an application level error. and I ran the same command on VM. It's working fine without error. but not working when i using the puppet.

manoharreddyg gravatar imagemanoharreddyg ( 2017-11-24 03:22:45 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2017-11-20 12:48:16 -0500

could be several things - be nice to see some more detailed error messages..

-> another apt running maybe? -> permissions on dpkg wrong - try 755 -> why use exec and not puppets native format.. exec=bad generally -> try running apt-get update cache before you run puppet - could embed this in your module

edit flag offensive delete link more


tried with sudo apt-get update as well. But still, gettig the same issue.

manoharreddyg gravatar imagemanoharreddyg ( 2017-11-24 03:42:08 -0500 )edit

answered 2017-11-24 03:25:45 -0500

manoharreddyg gravatar image

I ran the apt-get update command aswell

edit flag offensive delete link more

answered 2017-11-21 14:55:14 -0500

greynolds gravatar image


I am not sure what shell you are using? Try to run your command code "sudo" from the command line. Does it executes properly or will /bin/sudo work from your shell on the command line? I have noticed when you do not have full root access to execute commands can cause issues. You have to specifically state in your puppet code to execute the full path of a command to ensure root access sometimes. As opposed to having a class identifying the location of the full path of a command. This is a rare occurrence more so now than it has been in the past. In short, you will need to provide more debugging before any reasonable solution can be suggested.

edit flag offensive delete link more


Hi, I am running as a sudo user and i mentioned the all path on path => ['/usr/bin', '/bin', '/sbin',['/usr/sbin'],

manoharreddyg gravatar imagemanoharreddyg ( 2017-11-24 03:25:17 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2017-11-16 10:27:03 -0500

Seen: 239 times

Last updated: Nov 24 '17