Forum: CFEngine Help
Subject: Templating the solution?
Author: tjavo87
Link to topic: https://cfengine.com/forum/read.php?3,26068,26068#msg-26068
Hi Guys,
I'm working with dynamic bundlesequences as described on the website from Neil,
the first solution.
bundle common g {
vars:
any::
"bseq" slist => {
"site",
"ntp",
"hard"
},
policy => "free";
cf_dbs::
"bseq" slist => {
@{bseq},
"db2",
"mysql"
},
policy => "free";
cf_webfarm::
"bseq" slist => {
@{bseq},
"httpd",
"proxy",
"ntp"
},
policy => "free";
}
The code is copied from the website but with one execption. Under the
cf_webfarm I've also defined the ntp bundlesequence. For the cf_webfarm class
there is an extra line added to the ntp file.
The any class copies the default ntp file from the server via secure_cp. And
the class cf_webfarm would add an extra line with bundle edit_line. But now
I've created a loop.
Everytime cf-agent runs it checks the ntp file under the any class and
discovered the file is changed, so the new original file is copied. After that,
the class cf_webfarm add the new line because the file is restored.
How can I resolve this issue?
Thanx and Regards!
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine