Forum: CFEngine Help
Subject: Re: How to skip complete "bundle agent" execution depending of a class?
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,22837,22850#msg-22850
I really like using "methods:". It's really useful for breaking up complex
policies into logical and more manageable parts, but still having a single
point of entry. For example, something like this:
bundle agent sysconfig
{
vars:
# Files to edit
"files" string => "/etc/sysctl.conf";
"files" string => "/etc/inittab";
"files" string => "/etc/ssh/sshd_config";
[...]
# Users to create
"users" string => "Superuser";
[... other variables definitions ...]
methods:
"backup" usebundle => backup_files("sysconfig.files");
"sysctl" usebundle => config_sysctl;
"inittab" usebundle => config_inittab;
"sshd" usebundle => config_sshd;
"users" usebundle => create_users("sysconfig.users");
}
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine