Ask Your Question
0

applying all manifests?

asked 2014-02-04 11:56:24 -0500

updated 2014-02-05 13:45:11 -0500

Ancillas gravatar image

I have this in my site.pp The problem is that the first node appears to trickle down and apply the manifest from the second node...any reason why?

/etc/puppet/manifests/site.pp

node asr.example.com {
  import 'krb5.pp'
}

node clcmaljira.example.com {
  import 'krb5.pp'
  import 'clcmaljira.pp'
}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-02-05 13:49:23 -0500

Ancillas gravatar image

Import is funky and should be avoided.

Take this from the doc.

Behavior

Import statements have the following characteristics:

  • They read the contents of the requested file(s) and add their code to top scope
  • They are processed before any other code in the manifest is parsed
  • They cannot be contained by conditional structures or node/class definitions

I read that as saying that your imports won't be contained by the node definitions. That will cause all of your imports to be applied.

edit flag offensive delete link more

Comments

what about include ?

bismark gravatar imagebismark ( 2014-02-05 17:24:18 -0500 )edit

include + modules is the accepted best practice.

Ancillas gravatar imageAncillas ( 2014-02-06 01:25:37 -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

Stats

Asked: 2014-02-04 11:56:24 -0500

Seen: 38 times

Last updated: Feb 05 '14