I'm embarrassed, this was too easy:
bundle agent site_root_password
{
vars:
no_passwd::
"passwd_hash" string => "x";
some_class::
"passwd_hash" string => "somehash";
files:
"/tmp/shadow"
comment => "Set the local password",
edit_line => set_user_field("root",2,"$(passwd_hash)");
}
--Bruce
From: [email protected]
[mailto:[email protected]] On Behalf Of Bruce Carleton
Sent: Tuesday, March 02, 2010 1:14 PM
To: [email protected]
Subject: Changing Variable Based on Class
I'm modifying the example bundle agent to change root passwords. I need to set
a different password hash based on class. Are there any cf3 examples out there
that would show something similar?
Thanks,
--Bruce
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine