Forum: Cfengine Help Subject: Re: Sorting an slist Author: Authority Link to topic: https://cfengine.com/forum/read.php?3,22550,22581#msg-22581
Aha! Thanks, Diego. So using your first suggestion, it is clear to me that getindices is populating the slist out of order, but I don't like the idea of statically setting the number of indices _just in case_ a site only has one or two variables defined. That shouldn't happen, but I want Cfengine to be flexible enough to adjust. I've had some issues where I've left variables undefined which causes Cfengine to just insert the unresolved variable name as-is. DNS order does matter in this case because only the first server is on the LAN, the 2nd and 3rd are across the WAN. So since it seems that iteration follows the order of the slist, your second suggestion seems like the best solution although it will take a lot of tedious work to smash the three strings into one slist for each of my sites. Thanks again! _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine