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

As a policy writer managing debian hosts I would like to be able to specify additonal options when using the package_module packages promise implementation.

    XMLWordPrintable

    Details

      Description

      I would like to be able to specify additional options to affect the specific behaviour of a packages promsie using the apt_get package_module

      For example I might want to use a specific CaPath when invoking apt-get.

      packages:
        "mypackage"
           comment => "Install mypackage from our internal repo.  NB: The Internal repo uses myCA-signed certificate, which is right in this case, but should not be used everywhere",
           package_policy => "addupdate",
           package_method => "apt",
           options        => { "https::CaPath=/usr/local/etc/myCA/" };
      

      Or I might want to ensure that I have a locally cached package but not necessarily installed.

      packages:
        "screen"
          policy => "present",
          options => { "APT::Get::Download-Only" };
      

      Note: Users doing this may want to create a custom package_module and set default options so that the setting can easily be applied to many promises at once. The current implementation will require that the package module is duplicated or symlinked to a name that matches the package_module body. See CFE-2103 for more details.

      body package_module mysite_apt_get
      {
        inherit_from => apt_get;
        default_options => { "https::CaPath=/usr/local/etc/myCA/" };
      }
      

      Some apt-get options should be prefixed with -o like -o https::CaPath=/usr/local/etc/myCa, others should not like -b and -c. Some options have arguments like -c /path/to/file or -c=/path/to/file but others like -m do not.

      Should users have to specify this when using options:

      packages:
        "mypackage"
           comment => "Install mypackage from our internal repo.  NB: The Internal repo uses myCA-signed certificate, which is right in this case, but should not be used everywhere",
           package_policy => "addupdate",
           package_method => "apt",
           options        => { "-o", "https::CaPath=/usr/local/etc/myCA/" };
      

      Or should that be magically handled by the package_module itself?

      Additonal References:

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10003 Eystein Maloy Stenberg
                Reporter:
                a10042 Nick Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel