cfengine3: 3.1.5 os: debian we use expand_template form the standard cfengine library and small examples is included below. The result is not what we expected.
body common control { inputs => { "cfengine_stdlib.cf", }; bundlesequence => { template_usage("gpubatch"), }; } bundle agent template_usage(server) { files: "/var/tmp/config" create => "true", edit_line => expand_template( "/var/tmp/config.stub" ), classes => if_repaired( server_changed ); reports: server_changed:: "Changed server name"; } config.stub file: {{{ $arch $(sys.arch) $pbsserver $(template_usage.server) ideal_load 100 cluster sara }}} When run first time the /var/tmp/config contains the correct entries: {{{ cluster sara ideal_load 100 $pbsserver gpubatch $arch x86_64 }}} Now for this cluster the server name has changed. So we changed the statement from: - template_usage("gpubatch"), to: - template_usage("batch"), To our surprise we end up with the following /var/tmp/config file: {{{ cluster sara ideal_load 100 $pbsserver gpubatch $arch x86_64 $pbsserver batch }}} This is totally not convergent. Is this the intended behaviour or is this a bug? -- ******************************************************************** * Bas van der Vlies e-mail: b...@sara.nl * * SARA - Academic Computing Services Amsterdam, The Netherlands * ******************************************************************** _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine