Ask Your Question

is there any way to invoke puppet apply from powershell

asked 2015-05-21 03:33:02 -0500

rafal ammado gravatar image

i am automating aws provisioning and we're using puppet apply. however i need run it manually. is there any way to invoke it from powershell within puppet command propmpt

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-10-14 09:28:54 -0500

rafal ammado gravatar image

updated 2015-10-14 09:29:44 -0500

Hi, i looked at it but still cannot find any way to start puppet apply from powershell automatically. i need to start command prompt with Puppet manually and after that run puppet apply. is there any way to automate it aand run it as a sequence of command or only one command. something like :

$arg1 = 'C:\Program Files (x86)\Puppet Labs\Puppet Enterprise\bin\puppetshell.bat' $arg2 = 'puppet apply -v -l C:\osmanifest.log C:\ProgramData\PuppetLabs\puppet\etc\modules\os_manifest.pp' & $arg1 $arg2

this obviously doesnt work . i tried it out with 2, 3 args and didnt get it to work

edit flag offensive delete link more

answered 2015-05-22 11:04:48 -0500

millerjl1701 gravatar image

I'm not sure what direction you are going...

If you want to use puppet apply to execute powershell commands, there is a powershell provider module that you could use:

If you want powershell to execute a puppet apply command, there are a lot of ways to execute external commands... I would suggest looking at:

edit flag offensive delete link more


I tried out nearly all of them, no joy. still cannot find a way to run puppet apply using powershell. the idea is that i execute a powershell boostrap-script ( on amazon aws ) passed as a user data.

rafal ammado gravatar imagerafal ammado ( 2016-05-01 06:04:26 -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


Asked: 2015-05-21 03:33:02 -0500

Seen: 293 times

Last updated: Oct 14 '15