Ask Your Question

Puppet reports Exec as a change

asked 2013-06-06 14:00:19 -0500

louis gravatar image


We have a CI Server that compiles ASP.NET applications and we need to set the permissions to this specific user account. Based on Microsoft information and stackoverflow i have the following command that needs to be executed

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ga "Domain\User"

Our Puppet Resource looks like this...

  exec { 'perms':
     command   => 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe
     logoutput => true   }

Is it possible to stop this command from executing every time? We tried to find information on IIS tools that allow us to query ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-06-06 14:29:28 -0500

Ancillas gravatar image

If I'm understanding you, you want to run your command the very first time, and then never again as the permissions will be set upon subsequent runs.

Could you wrap your command in a batch script within an if block, and then if C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe succeeds, run an additional command to create an arbitrary file, indicating success?

If your Exec ran the batch script, which in turn ran C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe, you could use the creates parameter of Exec that only runs the command ... (more)

edit flag offensive delete link more


I was trying to find an iis command line tool that allowed to query this information but couldn't find anything. This looks a quick workaround. Will try it.

louis gravatar imagelouis ( 2013-06-06 17:52:31 -0500 )edit

it works. Is not a fancy solution but is a temporal workaround.

louis gravatar imagelouis ( 2013-06-07 09:48:33 -0500 )edit

It ain't pretty, but sometimes ugly is better than spending a bunch of time on something that *should* be simple :).

Ancillas gravatar imageAncillas ( 2013-06-07 13:45:37 -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: 2013-06-06 14:00:19 -0500

Seen: 265 times

Last updated: Jun 06 '13