Forum: Cfengine Help
Subject: Re: Test vs production CF environments
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,18427,18450#msg-18450

Typically I keep all my inputs in version control (usually Subversion).  I am 
often able to use the same policy in testing as I would in production.  I do 
this by having Cf evaluate where it is running based on policy.  Roughly:
bundle common global_classes {
    classes:

    test_hosts or => {
        "mercury",
        "venus",
        "earth",
        "mars"
    };

bundle common global_vars {

    vars:

    test_hosts::
        comment => "Testing policy host",
        "policy_host" string => "vega_example_com";

    !test_hosts::
        comment => "Production policy host",
        "policy_host" string => "polaris_example_com";
};


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

Reply via email to