Enc forcing environment even passed via command line

20 views
Skip to first unread message

Tejas Bhosale

unread,
Jan 12, 2023, 2:20:26 AM1/12/23
to Puppet Users
Hi,
I have enc script which when executed in output it post environemnt.

But for some host when i want to test my changes i want to pass -E on command line like

puppet agent -t -E test   but that is override by env it gives either development or production env .

Can we do anything to fix this issue so that i can test my code on those machines.

Martin Alfke

unread,
Jan 12, 2023, 6:18:52 AM1/12/23
to puppet...@googlegroups.com
Hi Tejas,

This can either be Puppet Enterprise or Foreman.

These can force a node to make use of a specific environment only and it forbids switching Puppet environment.

What are you using? PE? Foreman? A self written script? Something different?

Martin


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/4fb1c8c0-3c7b-4eee-a15d-1bf326370e9en%40googlegroups.com.

Tejas Bhosale

unread,
Jan 13, 2023, 2:37:38 AM1/13/23
to Puppet Users
I am using self written script took as ref from here

There i am classifying nodes based on env prod and development ...
but when i want to make some new changes on development i want multiple people to work there so i will create env based on their name like
-E tejas  -E xyz like that and run in noop so after make sure our changes work proper we can commit it in git . 

Martin Alfke

unread,
Jan 13, 2023, 3:41:19 AM1/13/23
to puppet...@googlegroups.com
Hi Tejas,

Nodes which should not have environment pinning should not have an environment entry set by the ENC.
This will allow the agent to switch to any environment.

Hth,
Martin


Tejas Bhosale

unread,
Jan 13, 2023, 8:05:45 AM1/13/23
to Puppet Users
Hi,
Thanks. Any another way can i implement to test my code before pushing to production if i want enc to classify my nodes based on env.
Reply all
Reply to author
Forward
0 new messages