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

Chocolatey Provider - Disabling a source sets some fields empty

    XMLWordPrintable

Details

    • Bug
    • Status: Needs Information
    • Normal
    • Resolution: Unresolved
    • None
    • None
    • chocolatey
    • Hide

      One should be able to disable a source without needing to specify all fields. Those fields should be remembered and not overwritten.

      Given Chocolatey installed, a licensed edition of Chocolatey, and the following code:

      chocolateysource {‘chocolatey.licensed’:
          ensure => disabled,
      }
      

      • The source should report disabling the source on the first run.
      • Subsequent runs should produce no change in reports.
      Show
      One should be able to disable a source without needing to specify all fields. Those fields should be remembered and not overwritten. Given Chocolatey installed, a licensed edition of Chocolatey, and the following code: chocolateysource {‘chocolatey.licensed’: ensure => disabled, } The source should report disabling the source on the first run. Subsequent runs should produce no change in reports.
    • Modules
    • Trivial
    • 1 - 1-5% of Customers
    • 1 - Superficial
    • 1 - ?
    • This is not an issue CS has heard of. The workaround of adding the needed lines to the resource seems pretty low effort.
    • Needs Assessment

    Description

      If you disable a source, the provider resets some of the fields, like priority to their default values. This is okay in some instances, but the licensed source will ensure it is there, at priority 10 and some other fields filled out.

      Given the following set of code based on a licensed version of Chocolatey:

      chocolateysource {'chocolatey.licensed':
          ensure => disabled,
      }
      

      It causes a report of

      Priority changed '10' to '0'
      User changed 'customer' to ''
      

      A workaround may be available (put the priority/user in the disable):

      ## Disable the licensed source, it can't be removed
      ## Disabled sources still need all other attributes until
      ## https://tickets.puppetlabs.com/browse/MODULES-4449 is resolved.
      ## Password is necessary with user, but not ensurable, so it should not
      ## matter what it is set to here. If you ever do get into trouble here,
      ## the password is your license GUID.
      chocolateysource {'chocolatey.licensed':
        ensure   => disabled,
        priority => '10',
        user     => 'customer',
        password => '1234',
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ferventcoder Rob Reynolds
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Zendesk Support