Yes I am passing in a list so the order is constant between runs. For you a sort would work as you described.
Thanks!! That will write out the file every time, though . . . Unless I sort it! Totally! That sounds like the way to go. So far! :-) Anyone with a better idea!? :-)Thanks again,GuyOn Mon, Nov 4, 2013 at 1:37 PM, Peter Norton < " target="_blank"> > wrote:
It's pretty common to pass in the hash from the databag and unpack it in the erb template, something like this (which is creating a key=value java properties file, but the idea is the same):<% @properties.each do | prop| p prop%><%= prop["property"].strip %>=<%= prop["value"].strip %><% end %>-PeterOn Mon, Nov 4, 2013 at 1:21 PM, Guy Matz < " target="_blank"> > wrote:
Ladles & Jellyspoons,Hello! I have to create a password file for proftpd and am feeling ambivalent about how to go about it, was hoping someone might help . . .Proftpd needs to have an olde style passwd file (hashed/crypted passwords included) to authenticate against. I am currently getting the usernames & passwords from a data bag and looping through them, checking my password file to see if they exist and adding if they don't. A helper method within a library file is actually doing the work, and I'm wondering if rather than passing the users to the method one-by-one, if I could be passing the entire data structure . . . it doesn't sound like a big difference, but passing the entire struct back to the helper would make things a log easier. It doesn't seem like the chef way, though. But I'm very new to the chef way.Puppet had a prased_file provider that made this sort of thing easier, but this doesn't seem to exist in chef.Any thoughts would be appreciated.Thanks,Guy
Archive powered by MHonArc 2.6.16.