Re: CFEngine Help: update.cf: multiple "copy_from" servers

2011-08-22 Thread Sjoerd Oostdijck
On 8/22/11 10:36 AM, no-re...@cfengine.com wrote: > From the top-level, what I want is for "update.cf", when checking > "/var/cfengine/inputs", to try one server, and if that times out, then to try > another in the list. > > Now the "copy_from" compound body has a "servers" which takes a list, a

Re: CFEngine Help: How to add to line with field_edits?

2011-08-03 Thread Sjoerd Oostdijck
=> append_line_if_no_match(".*netsharedpath.*",'%_netsharedpath /ncc:/srv'); "/etc/rpm/macros.nfs" comment => "Add some more nfs mounts to existing line", classes => if_repaired("rpm_macros_fixed"), edit_line =>

Re: CFEngine Help: Re: CFEngine Help: Re: yum_rpm automatic package upgrades

2011-07-22 Thread Sjoerd Oostdijck
re, when setting a higher version (v26) explicitely with > '==', it works fine. But that is not really what I'm looking after > since I'd like to not have to specify a certain version each time. > -- Sjoerd Oostdijck RIPE Network Coordination Centre RIPE

Re: Cfengine Help: Re: Dynamic classes and using them for reporting?

2011-06-09 Thread Sjoerd Oostdijck
: "installed installed_somerpm"; installed_someotherrpm:: "installed someotherrpm"; installed_foo:: "etc..."; installed_etc:: "etc etc etc"; -- Sjoerd Oostdijck RIPE Network Coordination Centre RIPE NCC

Re: Recursive rename of files from file.template to file

2011-06-09 Thread Sjoerd Oostdijck
h_search => u_recurse_ignore("inf",".git"), >file_select => u_by_name( ".*\.template" ), > action => u_immediate; > > "$(templates_dir)/.*/(.*)\.template" >comment => "Rename the templates from file.template to fil

Re: Cfengine Help: Help on best practice for Nagios deployment with cf3

2011-06-09 Thread Sjoerd Oostdijck
om-in-files Perhaps even condider using sync_cp from the CfengineStdLibrary to copy your files. http://www.cfengine.org/manuals/CfengineStdLibrary.html#body-copy_005ffrom-sync_005fcp -- Sjoerd Oostdijck RIPE Network Coordination Centre RIPE NCC, IT Department

Dynamic classes and using them for reporting?

2011-06-09 Thread Sjoerd Oostdijck
# slist => { extractclasspart("foo_(.*)") }; commands: "/bin/echo $(stuff)" promise_repaired => {"foo_$(stuff)"}; reports: dynamic_found:: "dynamic_found"; # Loop over myrepairs list to_

Re: Cfengine Help: Cfengine Help: Cannot copy files to remote host

2011-05-31 Thread Sjoerd Oostdijck
On 5/31/11 8:47 PM, Sjoerd Oostdijck wrote: > On 5/31/11 8:39 PM, Jerome Yanga wrote: >> cf3> Unable to establish connection with remote_host >> cf3>-> No suitable server responded to hail > > Is your server running a cf-serverd process? (and is that cf-serv

Re: Cfengine Help: Cfengine Help: Cannot copy files to remote host

2011-05-31 Thread Sjoerd Oostdijck
On 5/31/11 8:39 PM, Jerome Yanga wrote: > cf3> Unable to establish connection with remote_host > cf3> -> No suitable server responded to hail Is your server running a cf-serverd process? (and is that cf-serverd configured to trust keys from the box your are trying to connect from?) p.s. to b

Re: Append line to file if the regex did not match

2011-05-26 Thread Sjoerd Oostdijck
On 5/26/11 9:34 PM, Aleksey Tsalolikhin wrote: > Thanks for sharing, Sjoerd. How do you use this? > > I can imagine a use for appending a line if it is not already in a file, > but what is the scenario where you want to append a line if some > other regex is not in a file? > I'm using it in my yum

Append line to file if the regex did not match

2011-05-26 Thread Sjoerd Oostdijck
ed:: "$(line)" comment => "Insert line if regex did not match"; } -- Sjoerd Oostdijck RIPE Network Coordination Centre RIPE NCC, IT Department Singel 258, Amsterdam, NL http://www.ripe.net+31 20 535

Re: Automatically deleting files on nodes

2011-05-19 Thread Sjoerd Oostdijck
a file promise that checks if a file is present on the > server and then deletes it if it is deleted from the server? > Yup, you can define body copy_from example { purge => "true"; } -- Sjoerd Oostdijck RIPE Network Coordination Centre RIPE NCC, IT Depa

Re: Cfengine Help: Re: this.promiser not interpolating in copy_from?

2011-05-19 Thread Sjoerd Oostdijck
orning that he had fixed this in svn. I'm guessing it'll go into the next release or so. If you want to use it now, then you can compile a copy from svn. Cheers, -- Sjoerd Oostdijck RIPE Network Coordination Centre RIPE NCC, IT Departmen

this.promiser not interpolating in copy_from?

2011-05-19 Thread Sjoerd Oostdijck
/snarf.txt" classes => if_repaired("snarf_copied"), perms => mog("0700","root","root"), copy_from => local_cp("$(this.promiser).template"); } Cheers, -- Sjoerd Oostdijck RIPE Netw

Re: Cfengine Help: Re: Concatenating "inputs" from slists seems broken for cf-serverd

2011-05-17 Thread Sjoerd Oostdijck
th one element, being "cf_null". When cf-serverd starts up, it will try to read a file called cf_null which will break things. p.s. ignore_missing_inputs => "true" ; will only cause cf-serverd to loop it's startup endlessly... -- Sjoerd Oostdijck RIPE Ne

Concatenating "inputs" from slists seems broken for cf-serverd

2011-05-17 Thread Sjoerd Oostdijck
any:: # mandatory policies for all servers "inputs" policy => "ifdefined", slist => { "update.cf", # Provides: update @(inputs_company_wide),