Ask Your Question

For node definition/classification, what is the successor to `import 'nodes.pp'` now that `import` is deprecated?

asked 2014-06-26 17:30:13 -0500

updated 2014-07-10 18:29:57 -0500

I'm new to Puppet and I'm trying to figure out how to define and classify my 100+ nodes.

For a long time the standard way to classify nodes with Puppet Open Source was to use import 'nodes.pp'. This provided an easy way to classify a small number of nodes.

# /etc/puppetlabs/puppet/manifests/site.pp

# import many manifest files with node definitions
import 'nodes/*.pp'

# import a single manifest file with node definitions
import 'nodes.pp'

However, now that 'import' has been deprecated and will be removed in Puppet 4, this method is no longer recommended.

What is the recommended alternative to import 'nodes.pp'? There are many ways to classify nodes, but which methods are the most common and recommended?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-07-11 09:25:59 -0500

dystrophy gravatar image

If you set "manifests" to a directory, you can put nodes in separate .pp files:

edit flag offensive delete link more

answered 2014-07-08 17:52:58 -0500

TerriHaber gravatar image

If you have 100+ nodes, using site.pp to classify your nodes is not an easily-maintainable way to do classification.

If you wish to maintain classification in a way that is still able to be managed with a VCS, I recommend using hiera_include instead, with hiera:

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: 2014-06-26 17:30:13 -0500

Seen: 10,035 times

Last updated: Jul 11 '14