Use "overridable" on the default "services" variable. For example:

vars:
    any::
        "services" slist => { ... },
            policy => "overridable";

    redhat::

        "services" slist => { "telnet", ... };

etc.

Does that help?

Justin

-----Original Message-----
From: help-cfengine-boun...@cfengine.org 
[mailto:help-cfengine-boun...@cfengine.org] On Behalf Of nwat...@symcor.com
Sent: Friday, March 12, 2010 11:18 AM
To: help-cfengine@cfengine.org
Subject: Redefinition of a constant variable

This is a new error message in 3.0.4
 cf-promises -f ./promises.cf 
 !! Redefinition of a constant variable "services"
Promise (version not specified) belongs to bundle 'report_services' in 
file './services.cf' near line 38
 !! Redefinition of a constant variable "services"
Promise (version not specified) belongs to bundle 'report_services' in 
file './services.cf' near line 38
Comment: Check status of these services for this host
 !! Redefinition of a constant variable "services"
Promise (version not specified) belongs to bundle 'report_services' in 
file './services.cf' near line 38

The offending text is here:
     5  bundle agent report_services{
     6 
     7      vars:
     8 
     9          redhat::
    10  # List this variable first as the default.
    11              "services" slist => {
    12                  "anacron",
    13                  "apmd",
    14                  "arptables_jf",
    15                  "autofs",
    16                  "cpuspeed",
    17                  "cups",
    18                  "gpm",
    19                  "iptables",
    20                  "isdn",
    21                  "microcode_ctl",
    22                  "netfs",
    23                  "pcmcia",
    24                  "readahead_early",
    25                  "readahead_later",
    26                  "rpcgssd",
    27                  "rpcidmapd",
    28                  "rpcsvcgssd",
    29                  "sendmail",
    30                  "smartd",
    31                  "smb",
    32                  "xfs",
    33                  "xinetd"
    34              },
    35              comment => "Check status of these on all rhel hosts by 
default";
    36 
    37          unxxhd01::
    38              "services" slist => {
    39                  "xfs",
    40                  "smb",
    41                  "autofs"
    42              },
    43              comment => "Check status of these services for this 
host";

This redefinition is on purpose to allow for a default list than can be 
overridden by more specific classes.  How can I get around this message?


Sincerely,
--
Neil Watson
416-673-3465

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
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to