Cfengine Help (Mailing list): Re: How to replace hosts that change in the /etc/hosts file

2010-03-22 Thread forum
Forum: Cfengine Help (Mailing list) Subject: Re: How to replace hosts that change in the /etc/hosts file Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,16236,16621#msg-16621 Hi Daniel, Yes, sorry I failed to post it before. It's actually quite simple: # Define a cla

Re: How to replace hosts that change in the /etc/hosts file

2010-03-22 Thread daniel parkes
Yep, but I can't find this function in the cfengine open promise standard library. Diego do you have the function always in you solution so I can use it? Thnx On Mon, Mar 22, 2010 at 11:47 AM, Nakarin Phooripoom < mynameisje...@gmail.com> wrote: > It could be wherever you'd like either in che

Re: How to replace hosts that change in the /etc/hosts file

2010-03-22 Thread Nakarin Phooripoom
It could be wherever you'd like either in check-file-perms.cf or library.cf Cheers, --Nakarin On Mar 22, 2010, at 9:40 AM, daniel parkes wrote: > I'm using the first solution, but I'm getting and error with the always > clause: > > No such FnCall "always()" in promise @ /var/cfengine/git/check

Re: How to replace hosts that change in the /etc/hosts file

2010-03-22 Thread daniel parkes
I'm using the first solution, but I'm getting and error with the always clause: No such FnCall "always()" in promise @ /var/cfengine/git/check-file-perms.cfnear line 384 Not sure where I should have defined the always function, in my library.cf ? ... more file .

Re: How to replace hosts that change in the /etc/hosts file

2010-03-17 Thread Diego Zamboni
Daniel, I have been working on a similar problem, and came up with the following two bundles for editing files. I think both of these could be used to edit an /etc/hosts file, one by passing the pattern, e.g. edit_line => replace_or_add(".*\s+hostname", "1.2.3.4 hostname") # 1.2.3.4 is the ne

How to replace hosts that change in the /etc/hosts file

2010-03-17 Thread daniel parkes
Hi, We have a very large /etc/hosts(300 hosts) files in our servers that we have to mantain for certain acient applications, as of now what I have configured in cfengine 3.0.2 is an edit line bundle that reads from a master host file and if the host isn't in the file it adds it. The problem is ju