Ask Your Question
3

exec command always seems to return "invalid argument -"

asked 2013-06-12 10:19:11 -0500

peter gravatar image

I'm a total puppet noob, but this is causing me some grief. When I try and install IIS on win server 2008 via the pkgmgr.exe tool i always get the same error:

puppet apply D:\temp\init.pp
Error: Invalid argument -
Error: /Stage[main]//Exec[check_iis]/returns: change from notrun to 0 failed: In
valid argument -

#init.pp
exec { 'check_iis' : 
    command => "C:/windows/system32/CMD.exe /C START /w PKGMGR.EXE /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;",
}

i'm sure this is dead simple, but i can't seem to get past this :(

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-06-12 10:30:05 -0500

GregLarkin gravatar image

There may be a quoting issue in your exec command. Please try this instead and post back here with the results (note the use of single and double quotes):

#init.pp
exec { 'check_iis' : 
    command => 'C:/windows/system32/CMD.exe /C "START /w PKGMGR.EXE /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;"',
}
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

1 follower

Stats

Asked: 2013-06-12 10:19:11 -0500

Seen: 423 times

Last updated: Jun 12 '13