Cfengine folks, Hey I was trying to expand the example http://cfengineers.org/wiki/index.php/Check_root_password_age to handle a few accounts and also later add an action like update chage or better get a pw from some vault... (if there are no disagreements I will post this back to the cfengineers wiki when done). I ran this by a few folks on the IRC and different folks had tried and saw similar results. Many thanks you guy folks (Partner, Neil, Hawson and all the rest).
When I started to expand the example I found that passing a single string I can get this down in the method call but when I use it in the getfields it does not like it. Same in the commands section I can not get it to expand. I was wondering if anyone had any ideas? Example/issue code: http://pastebin.com/rC71GW5C Doc with variable/expansion: http://cfengine.com/manuals/cf3-reference#List-variable-substitution-and-expansion Similar thing to what I am doing: http://cfengine.com/manuals/cf3-reference#abortbundleclasses-in-agent Aleksey's latest git examples: https://github.com/cfengine/design-center/blob/master/policy_examples/verticalsysadmin_training_examples/1510_Methods._Simple_example.cf What I see is that if I use the $(user) in reports: section its ok, but if I do it in commands: as an args => "-d now $(user)", it does not like it. Same with the main function of the method: "no_of_fields" int => getfields("^$(user):.*","/etc/shadow",":","userdata"), This throws a lot of errors. in testing I am able to expand the string. I have also tried to send it a list but similar results. Any assistance ideas or solutions are greatly appreciated. Best Regards Gusto
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine