CraftyTech <hmmedina <at> gmail.com> writes:

> 
> I'm using puppet 0.25.5
> 
> On Dec 16, 10:26 am, CraftyTech <hmmed...@gmail.com> wrote:
> > Hello All,
> >
> >      I'm not sure what I'm missing here, but when defining a file
> > resource, to use as my yum repo, I can't seem to be able to purge
> > other files in the directory.  For instance, I just want to have
> > base.repo under /etc/yum.repos.d/, so I'm using:
> > file { "/etc/yum.repos.d/base.repo":
> >      owner => root,
> >      group => root,
> >      mode => 0644,
> >      purge => true,
> >      recurse => true,
> >      force   => true,
> >      replace => true,
> >      content => template("yum/base.repo.erb")
> >      }
> > The code creates the file, but fails to purge the rest of the data in
> > that dir.  Can anyone see what I'm missing here?
> >
> > Thanks,
> 

I think you should do the following:

1- Put base.repo on Puppet master file server to be shared then
2- file { "/etc/yum.repos.d":
      owner => root,
      group => root,
      mode => 0644,
      purge => true,
      recurse => true,
      source => "puppet:///location_folder_which_contains_base.repo
}

It will delete all files other than base.repo


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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.

Reply via email to