Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3489

cf-agent: mustache.c: RenderVariable: Assertion `false' failed.

    XMLWordPrintable

    Details

    • Story Points:
      3

      Description

      I get an assertion while trying to render a mustache template.

      string_mustache
      bundle agent firewall
      {
        vars:
            "_defaults" data => '{ "source": "0.0.0.0/0", "protocol": "tcp" }';
            "cfengine" data => mergedata( @(_defaults), '{"name": "cfengine" "destination-port": "5308" }' );
            "RULES" data => mergedata( '{ "ACCEPT": [ cfengine ]}' );
          reports:
            "$(with)" with => string_mustache( "{{#ACCEPT}}{{.}}{{/ACCEPT}}", RULES );
      }
      bundle agent __main__
      {
          methods:
            "firewall";
          reports:
            "CFEngine $(sys.cf_version)";
      }
      
      cf-agent: mustache.c:495: RenderVariable: Assertion `false' failed.
      inline_mustache
      bundle agent firewall
      {
        vars:
            "_defaults" data => '{ "source": "0.0.0.0/0", "protocol": "tcp" }';
            "cfengine" data => mergedata( @(_defaults), '{"name": "cfengine" "destination-port": "5308" }' );
            "RULES" data => mergedata( '{ "ACCEPT": [ cfengine ]}' );
          files:
            "/tmp/file.txt"
              create => "true",
              template_method => "inline_mustache",
              edit_template_string => "{{#ACCEPT}}{{.}}{{/ACCEPT}}",
              template_data => @(RULES);
      }
      bundle agent __main__
      {
          methods:
            "firewall";
          reports:
            "CFEngine $(sys.cf_version)";
      }
      
          info: Created file '/tmp/file.txt', mode 0600
      cf-agent: mustache.c:495: RenderVariable: Assertion `false' failed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olehermanse Ole Herman Schumacher Elgesem
                Reporter:
                a10042 Nick Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel