All-
We're currently using puppet 2.7.14 on master and all clients.
I thought I understood why 'anchor' is part of stdlib, but after
re-reading both
http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern
and
http://projects.puppetlabs.com/issues/8040
yesterday in preparation for trying to explain it to one of our team
that's coming up to speed on puppet, now I'm not so certain I really
understand.
Specifically, is it necessary to use the anchor pattern if your module
only defines resources and doesn't require or include any other classes?
For example, if I have
class benthic {
group { 'squarepants':
ensure => present,
gid => '99999',
}
user { 'spongebob':
ensure => present,
uid => '99999',
gid => 'squarepants',
home => '/home/pineapple',
}
package { 'starfish':
ensure => present,
}
file { '/etc/starfish.conf':
ensure => file,
owner => 'root',
group => 'squarepants',
mode => '0640',
source => 'puppet:///benthic/starfish.conf',
require => [
Package['starfish'],
User['spongebob'],
],
}
service { 'i_m_ready',
ensure => running,
enable => true,
require => Package['starfish'],
}
}
Given that class, do I need to use anchors to ensure that the
group/user/package/file/service resource graph is correctly attached to
(contained within) Class['benthic'], so that if some other module does
someresource { 'whatever':
...
require => Class['benthic'],
}
it just works, or, should I augment my class to also have
anchor { 'benthic::begin': }
anchor { 'benthic::end': }
Anchor['benthic::begin'] -> Group['squarepants']
Service['i_m_ready'] -> Anchor['benthic::end']
?
My resources within the class are using explicit "require" when necessary
and relying on puppet's automatic "require" logic in other places so
they are correctly ordered, but it's not clear from the pattern document
in the wiki or the ticket whether the issue is solely with nested
classes, or whether it's important to also use the pattern for standard
resources.
Also, the ticket was with respect to 2.6. I know this hasn't changed for
2.7, but is there anything in 3.0 that addresses the issue?
Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing & Infrastructure 701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.