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

Easily leverage classes from datastate() when providing explicit template_data

    XMLWordPrintable

    Details

      Description

      I would like to be able to more easily leverage classes that are defined when providing explicit data to mustache templates.

      Currently, mustache templates use datastate() when template_data is not provided. When template_data is provided, conditional rendering based on cfengine classes is not possible (unless they have been explicitly merged into the provided data).

      Discussion on help list: https://groups.google.com/d/msg/help-cfengine/VktwAdsQ3zc/DbNSDlWKAwAJ

      Implementation Ideas

      • New optional classes argument for template_data as a list of classes that are defined and should be merged into the classes key.
      • New optional merge_classes True/False argument to merge currently defined classes for use withe provided data.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            a10042 Nick Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: