Hello All,
I have a syntax question: Instead of the yumrepo function, I''d
rather distribute a custom repo file via puppet. i.g,
file { "/etc/yum.repos.d/base.repo":
ensure => present,
purge => true,
force => true,
owner => "root",
group => "root",
mode => 0644,
source => $architecture ? {
i386 => "puppet:///basic/base-x86.repo",
x86_64 => "puppet:///basic/base-x64.repo"}
}
As you can see, I used the purge function, thinking that it''d delete
other files within that directory, but it doesn''t work. How can I
ensure that the file I copy over is the only file that''s going to be
in that folder?
Cheers,
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
R.I.Pienaar
2010-Jun-16 19:34 UTC
Re: [Puppet Users] purging unnecessary data from directory
----- "CraftyTech" <hmmedina@gmail.com> wrote:> Hello All, > > I have a syntax question: Instead of the yumrepo function, I''d > rather distribute a custom repo file via puppet. i.g, > > file { "/etc/yum.repos.d/base.repo": > ensure => present, > purge => true, > force => true, > owner => "root", > group => "root", > mode => 0644, > source => $architecture ? { > i386 => "puppet:///basic/base-x86.repo", > x86_64 => "puppet:///basic/base-x64.repo"} > } > > As you can see, I used the purge function, thinking that it''d delete > other files within that directory, but it doesn''t work. How can I > ensure that the file I copy over is the only file that''s going to be > in that folder?The FAQ covers this, and the answer is different depending on your version of puppet -- R.I.Pienaar -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
CraftyTech
2010-Jun-16 19:59 UTC
[Puppet Users] Re: purging unnecessary data from directory
Got it, thanks. On Jun 16, 3:34 pm, "R.I.Pienaar" <r...@devco.net> wrote:> ----- "CraftyTech" <hmmed...@gmail.com> wrote: > > Hello All, > > > I have a syntax question: Instead of the yumrepo function, I''d > > rather distribute a custom repo file via puppet. i.g, > > > file { "/etc/yum.repos.d/base.repo": > > ensure => present, > > purge => true, > > force => true, > > owner => "root", > > group => "root", > > mode => 0644, > > source => $architecture ? { > > i386 => "puppet:///basic/base-x86.repo", > > x86_64 => "puppet:///basic/base-x64.repo"} > > } > > > As you can see, I used the purge function, thinking that it''d delete > > other files within that directory, but it doesn''t work. How can I > > ensure that the file I copy over is the only file that''s going to be > > in that folder? > > The FAQ covers this, and the answer is different depending on your version of puppet > > -- > R.I.Pienaar-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.