Ask Your Question
0

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
0

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
0

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: https://forge.puppetlabs.com/puppetla...

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: http://social.technet.microsoft.com/w...

edit flag offensive delete link more

Comments

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

Stats

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

Seen: 293 times

Last updated: Oct 14 '15