Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-3034

Chocolatey - custom provider for feature (configuration)

    XMLWordPrintable

Details

    • Hide

      Summary

      It should be able to get, test, and set feature switches from chocolatey's configuration through working with choco.exe.

      Details

      Given a clean Windows 2008R2 / 2012R2 box and Chocolatey versions 0.9.9.12 and 0.9.10 (beta).

      Have a manifest that

      • Installs chocolatey
      • Sets a feature
      • Disables another feature
      • Compiles on a master
      • Localization testing not required
      • Performance not a concern

      Test features - AutoUninstaller, FailOnAutoUninstaller

      Verify

      The configuration file accurately reflects the features toggled by manifest.
      Errors are accurately reflected when a bad configuration is entered.

      Show
      Summary It should be able to get, test, and set feature switches from chocolatey's configuration through working with choco.exe. Details Given a clean Windows 2008R2 / 2012R2 box and Chocolatey versions 0.9.9.12 and 0.9.10 (beta). Have a manifest that Installs chocolatey Sets a feature Disables another feature Compiles on a master Localization testing not required Performance not a concern Test features - AutoUninstaller, FailOnAutoUninstaller Verify The configuration file accurately reflects the features toggled by manifest. Errors are accurately reflected when a bad configuration is entered.
    • 5
    • Windows 2016-06-15

    Description

      choco feature was introduced in v0.9.9.0 and has had no significant changes since it was introduced. The docs related to feature are located at https://github.com/chocolatey/choco/wiki/CommandsFeature

      On first converge it may be important to install Chocolatey, set feature configuration AND install packages using that configuration set. This means it must be done as a custom type so that one can discover what version of Chocolatey was just installed, as custom types are the only thing that always runs client side.

      Alternatively, client side Facts would be awesome kylo. When are those coming?

      Type

      chocolateyfeature {'name':
        ensure => 'enabled | disabled' #no default
      }
      

      Details

      • checksumFiles (enabled by default)
      • autoUninstaller (enabled by default starting in 0.9.10 / chocolatey provider enables autouninstaller)
      • allowGlobalConfirmation (disabled by default)
      • failOnAutoUninstaller (disabled by default)

      starting with 0.9.10:

      • failOnStandardError (disabled by default)
      • powershellHost (enabled by default)
      • logEnvironmentValues (disabled by default)
      • virusCheck (disabled by default in FOSS / licensed versions only)
      • downloadCache (enabled by default / licensed versions only)

      Choco 0.9.10 Features

      choco feature list output:

      checksumFiles - [Enabled] | Checksum files when pulled in from internet (based on package).
      autoUninstaller - [Enabled] | Uninstall from programs and features without requiring an explicit uninstall script.
      allowGlobalConfirmation - [Disabled] | Prompt for confirmation in scripts or bypass.
      failOnAutoUninstaller - [Disabled] | Fail if automatic uninstaller fails.
      failOnStandardError - [Disabled] | Fail if install provider writes to stderr.
      powershellHost - [Enabled] | Use Chocolatey's built-in PowerShell host.
      logEnvironmentValues - [Disabled] | Log Environment Values - will log values of environment before and after install (could disclose sensitive data).
      virusCheck - [Enabled] | Virus Check [licensed versions only] - perform virus checking on downloaded files.
      downloadCache - [Enabled] | Download Cache [licensed versions only] - use the private download cache if available for a package.
      

      These are translated to the following in the chocolatey.config \ C:\PogramData\chocolatey\config\chocolatey.config (note the setExplicitly field):

      <features>
          <feature name="checksumFiles" enabled="true" setExplicitly="false" description="Checksum files when pulled in from internet (based on package)." />
          <feature name="autoUninstaller" enabled="true" setExplicitly="true" description="Uninstall from programs and features without requiring an explicit uninstall script." />
          <feature name="allowGlobalConfirmation" enabled="false" setExplicitly="true" description="Prompt for confirmation in scripts or bypass." />
          <feature name="allowInsecureConfirmation" enabled="false" setExplicitly="false" />
          <feature name="failOnAutoUninstaller" enabled="false" setExplicitly="false" description="Fail if automatic uninstaller fails." />
          <feature name="failOnStandardError" enabled="false" setExplicitly="false" description="Fail if install provider writes to stderr." />
          <feature name="powershellHost" enabled="true" setExplicitly="false" description="Use Chocolatey's built-in PowerShell host." />
          <feature name="logEnvironmentValues" enabled="false" setExplicitly="false" description="Log Environment Values - will log values of environment before and after install (could disclose sensitive data)." />
          <feature name="virusCheck" enabled="true" setExplicitly="true" description="Virus Check [licensed versions only] - perform virus checking on downloaded files." />
          <feature name="downloadCache" enabled="true" setExplicitly="false" description="Download Cache [licensed versions only] - use the private download cache if available for a package." />
      </features>
      

      Attachments

        Issue Links

          Activity

            People

              erick Erick Banks
              rob Rob Reynolds
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support