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

Documentation should note how class expressions are supported in augments

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: 3.14.0, 3.12.2
    • Fix Version/s: 3.14.0, 3.15.0
    • Component/s: Documentation
    • Labels:
      None

      Description

      Documentation should note how class expressions are supported in augments.

      CFE-2971 added support for class expressions in the classes augments key in 3.12.2 and 3.14.0 but the documentation does not reflect it.

      https://docs.cfengine.com/docs/master/reference-language-concepts-augments.html#classes

      Any class names you put here will be evaluated and installed as hard classes if they match the anchored regular expression. You can use any hard classes, persistent classes, or classes defined earlier in the augments list. Thus:

      "classes":

      Unknown macro: { "my_always"}

      results in my_always being always defined. my_other_apache will be defined if the classes server3 or server4 are defined, or if any class starting with debian is defined. my_other_always will be defined because my_always is always defined, and listed first. when_MISSING_not_defined will be defined if the class MISSING is not defined.

      You can see the list of classes thus defined through def.json in the output of cf-promises --show-classes (see Components and Common Control). They will be tagged with the tags source=augments_file,hardclass. For instance, the above two classes result in:

      % cf-promises --show-classes=my_
      ...
      my_always source=augments_file,hardclass
      my_other_always source=augments_file,hardclass
      my_other_apache source=augments_file,hardclass

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: