Is it possible to randomly select one policy server from a list, array or
whatever to interact with during a particular execution/run?
Using the below configuration, my clients equally interact with BOTH policy
servers (192.168.22.103 and 22.233).  Since the
policy servers are identifical their is no added value of interacting with
both of them during every run.

Thank you for your time and assistance.


Cfengine Version: 3.1.2
# ------------
# update.cf
# ------------
vars:
"ps_servers" slist => { @(g.phost) };


# ------------
# promises.cf
# ------------
bundle common g {

classes:

vars:
        any::
 "phost" slist => {"192.168.22.103","192.168.22.233"};

# ------------
# Sample bundle
# ------------
bundle agent rhel {
vars:
        "masterfiles" string => "/var/cfengine/masterfiles";
        "ps_servers" slist => { @(g.phost) };

files:
        linux::
                "/etc/sudoers"
                perms           =>      m_u_g("0440","root","root"),
                copy_from       =>
 remote_copy("$(masterfiles)/linux/all/etc/sudoers","$(ps_servers)"),
                action          =>      immediate;
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to