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

Tune packages cache refresh period from augments

    XMLWordPrintable

    Details

      Description

      As a policy writer, it would be nice to be able to adjust the thresholds for refreshing local packages, and package updates available without having to modify the vendor policy.

      Currently, I have to either define a custom package_module or I have to edit lib/packages.cf directly to change the default threshold for refreshing the installed package cache as well as the list of package updates that are available.

      It would be nice if I could override these settings using augments. For example:

      {
        "vars": {
          "package_module_query_updates_ifelapsed": "60",
          "package_module_query_installed_ifelapsed": "5"
        }
      }
      

      Package modules may be tweaked to look like this:

      body package_module apt_get
      {
          query_installed_ifelapsed => "$(def.package_module_query_installed_ifelapsed)";
          query_updates_ifelapsed => "$(def.package_)module_query_updates_ifelapsed)";
          #default_options =>  {};
      }
      

        Attachments

          Issue Links

            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:

                  Summary Panel