Hi John Thanks for pointing me to the resources purge option - i was not aware of it.
However I get this error then trying it err: Failed to apply catalog: Parameter purge failed: Purging is only supported on types that accept 'ensure' at /etc/puppet/modules/yum/ manifests/init.pp:12 So I guess I'd stick with Nan solution for now. Thanks On Aug 30, 4:26 pm, jcbollinger <john.bollin...@stjude.org> 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 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.