Is it possible to include files in puppet.conf

48 views
Skip to first unread message

Edd Grant

unread,
Jan 23, 2014, 12:15:18 PM1/23/14
to puppet...@googlegroups.com
Hi,

Is it possible to include files in puppet.conf? I'd like to use this to be able to declare new environments in their own files rather than having to edit puppet.conf each time.

I'm thinking something along the lines of how sudoers works with sudoers.d

# puppet.conf
include environments/*


And then having an environments folder which contains files which declare environments

i.e.

environments/dev01.conf
environments/dev02.conf
environments/test01.conf
environments/test02.conf
environments/prod.conf
etc


Is anything like this currently supported by Puppet? It would make the task of automating the definition of environments much more straight forward than the current requirement to problematically amend/ munge puppet.conf.

Cheers,

Edd

Jose Luis Ledesma

unread,
Jan 23, 2014, 12:37:03 PM1/23/14
to puppet...@googlegroups.com
Read about dynamic environments.

Preview: make use of $environment in puppet.conf

Regards,

Edd Grant

unread,
Jan 24, 2014, 4:34:25 AM1/24/14
to puppet...@googlegroups.com
Hi Jose,

Thanks for responding, I should have mentioned I have already looked at dynamic environments. Unfortunately though several of our environments require a unique module path and I couldn't find a way to accommodate that using dynamic environments.

I suppose the ideal would be for us to remove the need to have a unique module path in each environment but I can't see that happening any time soon. Will have a ponder on other approaches.

Cheers.

Edd



--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/8pUqla3S6CI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/78fcf9ae-91ea-4ef3-bd65-2e5a73dd35e4%40googlegroups.com.



--
Web: http://www.eddgrant.com
Email: e...@eddgrant.com
Mobile: +44 (0) 7861 394 543

Jose Luis Ledesma

unread,
Jan 24, 2014, 8:32:44 AM1/24/14
to puppet...@googlegroups.com
I don't understand the problem, just use a modulepath without the $environment, or set a couple of paths this way:
modulepath = $confdir/environments/common:$confdir/environments/$environment/modules

Regards,

Reply all
Reply to author
Forward
0 new messages