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
=>
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, 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
:
"installed installed_somerpm";
installed_someotherrpm::
"installed someotherrpm";
installed_foo::
"etc...";
installed_etc::
"etc etc etc";
--
Sjoerd Oostdijck RIPE Network Coordination Centre
RIPE NCC
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
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
# slist => { extractclasspart("foo_(.*)") };
commands:
"/bin/echo $(stuff)"
promise_repaired => {"foo_$(stuff)"};
reports:
dynamic_found::
"dynamic_found";
# Loop over myrepairs list to_
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
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
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
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
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
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
/snarf.txt"
classes => if_repaired("snarf_copied"),
perms => mog("0700","root","root"),
copy_from => local_cp("$(this.promiser).template");
}
Cheers,
--
Sjoerd Oostdijck RIPE Netw
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
any::
# mandatory policies for all servers
"inputs"
policy => "ifdefined",
slist => {
"update.cf", # Provides: update
@(inputs_company_wide),
16 matches
Mail list logo