Ask Your Question
0

Specifiy Environment Parameters

asked 2016-11-25 09:04:43 -0500

TommyQuality gravatar image

updated 2016-11-25 09:19:32 -0500

Hi, I'm very new to PE, and trying to define the environment the node should belong to in the power shell script. So i'm appending this parameter "agent:environment=<dev>" to the end of the scrip, but for some reason in the puppet.conf file for the agent seems to be defaulting to production? Any help would be appreciated TommyQ

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-11-25 16:24:25 -0500

TommyQuality gravatar image

updated 2016-11-26 04:00:57 -0500

I'm installing the agent using the powershell command after setting the class in PE.. within the powershell command you can pass agent parameters to customise the agent conf, but for some reason the environment param doesn't seem to be applied. By using the powershell command I was hoping to automate the deployment of the agent for nodes into specific environments.

This is the command i've been running:

 [Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; $webClient = New-Object System.Net.WebClient; $webClient.DownloadFile('https://<PUPPET MASTER FQDN>:8140/packages/current/install.ps1', 'install.ps1'); .\install.ps1 agent:environment=<dev>

Thanks

Tommy

edit flag offensive delete link more

Comments

So on your agent puppet.conf did the entry for environment is set?

lupin gravatar imagelupin ( 2016-11-25 16:26:19 -0500 )edit

On the node agent it's set, but as production and not dev which is the parameter I passed in the script

TommyQuality gravatar imageTommyQuality ( 2016-11-26 01:46:20 -0500 )edit

What does insta..ps1 contain? It that suppose to modify the entry of puppet.conf base on the parameter that you pass? You need to fix that somehow so that the environment entry on puppet.conf reflect the change that you want.

lupin gravatar imagelupin ( 2016-11-26 13:30:04 -0500 )edit

Thanks Lupin, I found the issue. I needed to put a space between the environment= "agent:environment = dev" Thanks

TommyQuality gravatar imageTommyQuality ( 2016-11-27 04:58:24 -0500 )edit
0

answered 2016-11-25 15:44:27 -0500

lupin gravatar image

Where do you want to set the Environment parameters? You can set either on PE, on your node group classification ( default as you noticed is Production). You may also set it on agent puppet.conf on environment = < env > parameter.

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: 2016-11-25 09:04:43 -0500

Seen: 34 times

Last updated: Nov 26 '16