field_edits removes columns

2009-12-03 Thread Matthias Teege
Moin, I use the following recipe to set the root password. bundle agent pass { vars: "users" slist => { "root" }; files: "/var/cfengine/ppkeys/pw.txt" copy_from => mycopy("$(g.keydir)/$(sys.fqhost)-root.txt","$(g.srv"); "/tmp/master.passwd" edit_line => set_passwd(@(pa

quote the at sign

2009-12-09 Thread Matthias Teege
Moin, i insert a line with files: "/etc/crontab" edit_line => add_line("@reboot root .."); where add_line is bundle edit_line add_line(value) { insert_lines: "$(value)"; } cf-agent gives me a warning "List parameter not found while constructing "add_line" - use @(scope.variabl

Re: quote the at sign

2009-12-09 Thread Matthias Teege
> Try escaping \...@. This gives me "\...@reboot" in the crontab file but no warning anymore :-). There must be another "solution". Many thanks Matthias ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/h

Search a file in different locations

2009-12-11 Thread Matthias Teege
Moin, I can set a class based on the existence of a file with fileexists. But sometimes I have to set a class if a file exists in directory "/a" or "/b" or "/c". I can use something like this: "exists_in_a" expression => fileexists("/a/foo"); "exists_in_b" expression => fileexists("/b/foo"); "e

Re: Search a file in different locations

2009-12-11 Thread Matthias Teege
Moin, > "exists" expression => filesexist("@(filelist)"); I think this only works if the file is on all locations. I'm looking for "or". Many thanks Matthias ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listi