Forum: CFEngine Help
Subject: Re: Build an slist from an array of slists
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,27036,27065#msg-27065

nickanderson Wrote:
-------------------------------------------------------
> and since a list can only contain
> one instance of a value I figured I would just get
> all of the keys into a single list, test validity
> and raise classes.

No, you can duplicate elements in a list.  It actually works fine in something 
like I imagine this situation will look for you, where you've going to insert a 
line into a file, and possibly copy a file (depending on the ssh version).  
When the same file is processed a second time, it will look like the same 
promise to CFEngine, and will be skipped because the if_elapsed timer hasn't 
yet expired.  I use that behavior for auto-generating Kerberos keys and for 
processing SSL certs, where I need the full hostname and short hostname both 
included; I just include both the name a reverse lookup reports and the name 
that sys.fqhost returns in the list, and even if they're duplicates, everything 
still works fine (according to the verbose output and observed behavior). :)

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to