I wanted to move a file from one directory to another because my co- worker didn''t like where it was being put by puppet. I went into puppet and changed the name parameter of the the file directive. I then created a new file directive to delete the old file, but I was wondering if there was a better way to do this. So, just to clarify, I went from: file {"myfile": name => "/root/myfile", ... } to: file {"myfile": name => "/newdirectory/myfile", ... } file {"deleteoldlocationofmyfile": name => "/root/myfile", ensure => absent, } I just feel like moving the location of a file will cause bloat of configurations in puppet, but maybe I''m missing some great parameter. Thanks, Leah --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Thu, Nov 13, 2008 at 9:06 AM, Leah <leahfist@gmail.com> wrote:> > I wanted to move a file from one directory to another because my co- > worker didn''t like where it was being put by puppet. I went into > puppet and changed the name parameter of the the file directive. I > then created a new file directive to delete the old file, but I was > wondering if there was a better way to do this. > > So, just to clarify, I went from: > > file {"myfile": > name => "/root/myfile", > ... > } > > to: > > file {"myfile": > name => "/newdirectory/myfile", > ... > } > > file {"deleteoldlocationofmyfile": > name => "/root/myfile", > ensure => absent, > } > > I just feel like moving the location of a file will cause bloat of > configurations in puppet, but maybe I''m missing some great parameter. > >That is really about the way to do it. Don''t for get that after it has run for awhile and all teh clients have resynced to the new location you can remove the code needed to delete the old location. Evan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Moving a bunch of config files around like this is going to be clumsy without Puppet. If you have to do this a lot you could parametrize a define, and I would get rid of the ensure => absent once the changes have propagated. $0.02 On Thu, Nov 13, 2008 at 10:51 AM, Evan Hisey <ehisey@gmail.com> wrote:> > On Thu, Nov 13, 2008 at 9:06 AM, Leah <leahfist@gmail.com> wrote: > > > > I wanted to move a file from one directory to another because my co- > > worker didn''t like where it was being put by puppet. I went into > > puppet and changed the name parameter of the the file directive. I > > then created a new file directive to delete the old file, but I was > > wondering if there was a better way to do this. > > > > So, just to clarify, I went from: > > > > file {"myfile": > > name => "/root/myfile", > > ... > > } > > > > to: > > > > file {"myfile": > > name => "/newdirectory/myfile", > > ... > > } > > > > file {"deleteoldlocationofmyfile": > > name => "/root/myfile", > > ensure => absent, > > } > > > > I just feel like moving the location of a file will cause bloat of > > configurations in puppet, but maybe I''m missing some great parameter. > > > > > That is really about the way to do it. Don''t for get that after it has > run for awhile and all teh clients have resynced to the new location > you can remove the code needed to delete the old location. > > Evan > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the replies. I just wanted to verify there wasn''t a better way to do this. Hopefully it shouldn''t happen very often. On 11/13/08, Andrew Shafer <andrew@reductivelabs.com> wrote:> Moving a bunch of config files around like this is going to be clumsy > without Puppet. > > If you have to do this a lot you could parametrize a define, and I would get > rid of the ensure => absent once the changes have propagated. > > $0.02 > > > On Thu, Nov 13, 2008 at 10:51 AM, Evan Hisey <ehisey@gmail.com> wrote: > >> >> On Thu, Nov 13, 2008 at 9:06 AM, Leah <leahfist@gmail.com> wrote: >> > >> > I wanted to move a file from one directory to another because my co- >> > worker didn''t like where it was being put by puppet. I went into >> > puppet and changed the name parameter of the the file directive. I >> > then created a new file directive to delete the old file, but I was >> > wondering if there was a better way to do this. >> > >> > So, just to clarify, I went from: >> > >> > file {"myfile": >> > name => "/root/myfile", >> > ... >> > } >> > >> > to: >> > >> > file {"myfile": >> > name => "/newdirectory/myfile", >> > ... >> > } >> > >> > file {"deleteoldlocationofmyfile": >> > name => "/root/myfile", >> > ensure => absent, >> > } >> > >> > I just feel like moving the location of a file will cause bloat of >> > configurations in puppet, but maybe I''m missing some great parameter. >> > >> > >> That is really about the way to do it. Don''t for get that after it has >> run for awhile and all teh clients have resynced to the new location >> you can remove the code needed to delete the old location. >> >> Evan >> >> > >> > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Nov 13, 2008, at 7:06 AM, Leah wrote:> I wanted to move a file from one directory to another because my co- > worker didn''t like where it was being put by puppet. I went into > puppet and changed the name parameter of the the file directive. I > then created a new file directive to delete the old file, but I was > wondering if there was a better way to do this.It''d be nice to have a generalized ''rename'' parameter that allowed one to rename resources, but it''s been asked for so rarely (I think this is actually the first time) that I''ve never actually put any time into it. At this point, the solution you''ve chosen is the most reasonable. -- It has recently been discovered that research causes cancer in labratory rats. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---