Forum: Cfengine Help
Subject: Re: Define phost variable by clients network
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,19333,19336#msg-19336


bundle common global_classes {

# This bundle must be duplcated in promises.cf.
    classes:

        "dev_env" or => { 
                classify("unxxhd01.example.com"), 
                classify("archz01.example.com"),
                classify("arcdev01.example.com"),
                classify("brkxhd01.example.com"),
                classify("cdsxhd01.example.com"),
                classify("sboxhd08.example.com"),
                classify("sbowbd002.example.com"),
                classify("pdf-dev.example.com"),
                classify("ipxhd02.example.com"),
                classify("ipind011.example.com"),
                classify("edpvsd01.example.com"),
                classify("sterlz01.example.com"),
                classify("eprdbd01.example.com"),
                classify("ippdd01.example.com"),
        },
                comment => "Class to identify development environment CF hosts";
}


Then later.


bundle common g{

    vars: 
    
        !dev_env::
                "phost" string => "configa01.example.com";
        dev_env::
                "phost" string => "unxxhd01.example.com";


In previous versions I found that the bundle common_classes only took hold if 
it was at the top of promises.cf.  I don't know if that is still the case.

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

Reply via email to