Ask Your Question

deprication of import

asked 2015-02-10 10:52:43 -0500

simonrondelez gravatar image

I noticed the deprication of the keyword import in my main manifest. I use it like this:

import "clouds/c1/*"

that way we can split our configurations up a bit. Is there a way to fix this deprication?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-02-10 15:07:14 -0500

GregLarkin gravatar image

The short answer is to refactor your Puppet code into autoloadable modules with the structure described here:

The reasoning for deprecating and eventually removing the import keyword is as follows:

The distinction between import and include/class declaration confuses many users, and we've had a number of edge cases with import that have caused even more confusion.

The path forward is to structure your manifests in classes in modules, and to follow autoloader conventions. This does make Puppet much more opinionated, but we believe the benefits are worth it.

Particularly this will push people towards a world where Puppet manifests are more easily shareable in the form of modules, and by running everyone through the autoloader, we'll have a much more consistent set of behaviors.

Hope that helps!

edit flag offensive delete link more


where should i declare my nodes then? because there are no nodes in my site.pp but i sort them in sub directories

simonrondelez gravatar imagesimonrondelez ( 2015-02-10 16:14:58 -0500 )edit
GregLarkin gravatar imageGregLarkin ( 2015-02-10 16:52:32 -0500 )edit

thanks for the info!

simonrondelez gravatar imagesimonrondelez ( 2015-02-11 09:32:37 -0500 )edit

Glad to help!

GregLarkin gravatar imageGregLarkin ( 2015-02-11 10:38:35 -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

1 follower


Asked: 2015-02-10 10:52:43 -0500

Seen: 56 times

Last updated: Feb 10 '15