On Wed, Oct 5, 2016 at 12:24 AM, Aditya Gupta <adityalnc...@gmail.com> wrote:
> Hello All, > I am using host resources in my puppet class to manage hosts file of the > client. > > I am facing one issue where if I have already connected client to the > puppet server where hosts file have its own entries as well as entries > defined by puppet server . > > But whenever I replaced my hosts file from some other server then in next > puppet run my old entries removed from the hosts file and I can only see > entries managed by puppet. > > > FYI in future this type of question is probably more suited to puppet-users than puppet-dev. It sounds like resource purging, meaning that Puppet will purge any resources found that are not under Puppet control. You don't mention if you use a Forge module to manage hosts, or something home grown - if you're using something like https://forge.puppet.com/ghoneycutt/hosts then you'll need to set (or unset) the "purge_hosts" option. Otherwise, you might have something like this declared.... resources { 'hosts': purge => true } Either way, it should be easy enough to change the behaviour but without knowing what module you are using I can't really tell you exactly how. Craig -- Enviatics | Automation and Configuration Management Puppet Labs Service Delivery Partner & Certified Consultant http://www.enviatics.com | @Enviatics | cr...@enviatics.com -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CACxdKhGX_n4C6xGaT7GW3TS3smoLgekk2iAdYFwybPjbWQs_4Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.