Ask Your Question

execute multiple environments

asked 2016-02-07 01:50:16 -0600

nobody gravatar image

updated 2016-02-07 02:00:14 -0600

Hi all! Could you please help me with one question: How i can execute multiple environments?

Example: I have two environments - production (Default env.) and helloworld . I want at first execute production and then execute helloworld. It is possible? Maybe i can somehow call production from helloworld?

I try to write in my puppet.conf : environment = production helloworld - but this has no effect.

Best regards, Me.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-02-07 15:51:45 -0600

DarylW gravatar image

As far as I know, I don't think you can directly call one puppet environment from another environment.

If you need two different sets of environments to run, I have heard of people using cron instead of the puppet daemon, and doing things that way.

The example was from talking with Tim Nolet about

They had a use-case that had

  1. A set of modules to run every half hour to ensure configuration
  2. a separate, long running set of modules to ensure CIS compliance that was run once a day

It may help if you could describe what you are trying to accomplish: - Are you trying to separate out 'system configuration' from 'app deployment'? - Are you separating out a 'bootstrapping' process from a standard config management set of operations? - Are you trying to do something like Tim above and run one set of 'compliance' options separate from your regular configuration?

Sorry that I'm not much direct help, hopefully you can find a solution that fits your needs!

edit flag offensive delete link more

answered 2016-02-07 18:11:13 -0600

Henrik Lindberg gravatar image

You cannot "call" one environment from another. An environment defines all of the code, data and configuration that is used for all of the nodes in that environment. There are many other ways you can control what is going to happen on a node by using node classification, by having conditional logic looking at the facts provided from the node, by looking up data from hiera, etc. Which one to select depends on what you want to do.

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


Asked: 2016-02-07 01:50:16 -0600

Seen: 148 times

Last updated: Feb 07 '16