On Sun, Sep 23, 2012 at 12:46 AM, Mark wrote:
>
> I think what you are trying to write is this:
>
>
> vars:
> "webservers" slist => { "web01", "web02", "web03" };
>
> classes:
>
> "webclass" or => { "@(webservers)" };
Dear Mark,
I tried the above, and it works standalone, but when I tried to
integrate it into Neil Watson's dynamic bundlesequence example
(http://watson-wilson.ca/2011/09/dynamic-bundlesequence-in-cfengine.html)
I got: Unable to parse class expression: ->@(webservers)
This is with 3.3.5. Please advise?
[root@web01
370-0010_Dynamic_Bundlesequence.__demo_of_dynamic_inputs_and_bundleseq]#
cf-agent -f ./main.cf -K
Unable to parse class expression: ->@(webservers)
Bundle "httpd" listed in the bundlesequence is not a defined bundle
Bundle "proxy" listed in the bundlesequence is not a defined bundle
Fatal CFEngine error: Errors in promise bundles
cf-agent was not able to get confirmation of promises from
cf-promises, so going to failsafe
[root@web01
370-0010_Dynamic_Bundlesequence.__demo_of_dynamic_inputs_and_bundleseq]#
more main.cf site ntp httpd proxy db2 mysql
::::::::::::::
main.cf
::::::::::::::
bundle common global_classes {
classes:
"cf_dbs"
expression => "linux";
vars:
"webservers" slist => { "web01", "web02", "web03" };
classes:
"cf_webfarm" or => { "@(webservers)" };
}
bundle common global_vars {
vars:
any::
"bseq" slist => {
"site",
"ntp",
},
policy => "overridable";
cf_dbs::
"bseq" slist => {
@{bseq},
"db2",
"mysql"
},
policy => "overridable";
cf_webfarm::
"bseq" slist => {
@{bseq},
"httpd",
"proxy"
},
policy => "overridable";
}
body common control {
inputs => { @{global_vars.bseq} };
bundlesequence => { @{global_vars.bseq} };
}
::::::::::::::
site
::::::::::::::
bundle agent site{
reports:
cfengine_3::
"site bundle";
}
::::::::::::::
ntp
::::::::::::::
bundle agent ntp{
reports:
cfengine_3::
"ntp bundle";
}
::::::::::::::
httpd
::::::::::::::
bundle agent httpd{
reports:
cfengine_3::
"httpd bundle";
}
::::::::::::::
proxy
::::::::::::::
bundle agent proxy{
reports:
cfengine_3::
"proxy bundle";
}
::::::::::::::
db2
::::::::::::::
bundle agent db2{
reports:
cfengine_3::
"db2 bundle";
}
::::::::::::::
mysql
::::::::::::::
bundle agent mysql{
reports:
cfengine_3::
"mysql bundle";
}
[root@web01
370-0010_Dynamic_Bundlesequence.__demo_of_dynamic_inputs_and_bundleseq]#
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine