Forum: CFEngine Help Subject: Using defaults promises Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,26464,26464#msg-26464
Consider this bundle: body common control { bundlesequence => { "main", }; } bundle agent main { methods: "any" usebundle => test; } bundle agent test { vars: #"doc" string => "1.0"; "doc" string => "cfengine 3.4.0"; "doc" string => "bundle agent test"; methods: "Document as vars" usebundle => doc("test.doc"); } bundle agent doc(ref){ defaults: "version" string => "Not provided"; vars: "version" string => "${${ref}}"; "require" string => "${${ref}}"; "name" string => "${${ref}}"; reports: cfengine:: "Name ${name}"; "Version ${version}"; "Require ${require}"; } Since doc is not defined I expect the defaults promise to be repaired. Alas that is not so. R: Name bundle agent test R: Version ${test.doc} R: Require cfengine 3.4.0 Have I done something wrong? _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine