Oh, dear. Yes, John has it. :/ This is definitely a bug, and something we should fix. Can you file a ticket with the details, so that we don't lose track of this?
Daniel On Tue, Aug 30, 2011 at 06:26, jcbollinger <[email protected]> wrote: > You put your finger on it when you wrote "It will purge files managed > by other puppet resources in the same directory," but Daniel missed > your meaning, as did I on my first reading. > > You have tripped over a subtlety in the meaning of File's 'purge' > parameter: it removes files that are not managed *via File > resources*. It is not aware of files that are managed via other > resources. You might consider filing a ticket about this, but do > check first whether there's an existing one (i.e. I didn't). > > On the other hand, one reason you've run into trouble is that you're > mixing levels of resource abstraction and effectively managing the > same physical resources through two independent paths. To ensure that > only the repos managed via Puppet are in fact present at all, you > should be using the Resources metaresource: > > resources { 'yumrepo': purge => true } > > That says more directly what you seem really to want to say, without > assuming any particular back-end storage for repository declarations. > Moreover, it should do the right thing if you happen to end up with > managed and unmanaged repositories declared in the same file. (Note: > do not set the 'purge' parameter for File['/etc/yum.repos.d'], or set > it to 'false'.) > > > John > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
