If I have a list of hostnames, many of which have hyphens in them,
what's the cleanest way of generating a class list. For example, say I
have the following slist, which may come from a text file, LDAP, or may
just be hard-coded in a policy file.
vars:
"test_hosts" slist => {
"foo"
"bar-a"
"bar-b"
"baz"
};
I want to do something to this effect using canonify():
classes:
"test_hosts" or => {
"foo",
"bar_a",
"bar_b",
"baz"
};
The source variable may be very long, so I don't want to hard-code the
class definition, too. What would be the simplest way of doing this?
Thanks,
Justin
This electronic communication and any attachments may contain confidential and
proprietary
information of DigitalGlobe, Inc. If you are not the intended recipient, or an
agent or employee
responsible for delivering this communication to the intended recipient, or if
you have received
this communication in error, please do not print, copy, retransmit, disseminate
or
otherwise use the information. Please indicate to the sender that you have
received this
communication in error, and delete the copy you received. DigitalGlobe reserves
the
right to monitor any electronic communication sent or received by its
employees, agents
or representatives.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine