Sorry, I forgot to remove a {
classes:
"svxx" expression => classmatch("sv..");
Mark Burgess wrote:
> Oh, I didn't notice that. But why not simply write
>
> classes:
> "svxx" expression =>{classmatch("sv..");
>
> Erlend Leganger wrote:
>> I guess it's the and-any construct that looks strange to me, it's like
>> writing a boolean expression with an "and True" at the end:
>>
>> if ($condition && 1){
>> &do_something;
>> }
>>
>> But if this is the best way, I won't complain.
>>
>> - Erlend
>>
>> On 21 April 2010 07:19, Mark <[email protected]> wrote:
>>> Why do you say this is convoluted? I think it looks just fine
>>>
>>>
>>> Mark
>>>
>>>
>>> On 21 Apr 2010, at 07:07, Erlend Leganger <[email protected]> wrote:
>>>
>>>> I have some servers named sv01, sv02, sv03, ... which I need a class
>>>> for in cf3 community 3.0.2. I have come up with this:
>>>>
>>>> classes:
>>>> "svxx" and =>{classmatch("sv.."),any};
>>>>
>>>> so that I later can do for example:
>>>>
>>>> files:
>>>> svxx::
>>>> "/etc/passwd"
>>>> handle=>"update_passwd",
>>>> ...
>>>>
>>>> I don't remember how I came up with this construct (probably by trial
>>>> and error until it clicked) - it looks kind of convoluted.
>>>>
>>>> What is the best way to do this?
>>>>
>>>> - Erlend
>>>> _______________________________________________
>>>> Help-cfengine mailing list
>>>> [email protected]
>>>> https://cfengine.org/mailman/listinfo/help-cfengine
>> _______________________________________________
>> Help-cfengine mailing list
>> [email protected]
>> https://cfengine.org/mailman/listinfo/help-cfengine
>
--
Mark Burgess
-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway
Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine