Forum: Cfengine Help
Subject: Re: Problems with expand_template it is not convergent.
Author: bbomgardner
Link to topic: https://cfengine.com/forum/read.php?3,22036,22051#msg-22051

Try emptying the target file first:


bundle agent template_usage(server)
{

files:
"/var/tmp/config"
create => "true",
edit_defaults => empty,
edit_line => expand_template( "/var/tmp/config.stub" ),
classes => if_repaired( server_changed );

reports:
server_changed::
"Changed server name";
}



Otherwise, expand_template actually inserts any unique lines from the template 
file into the promiser.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to