Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6656

ensure => latest doesn't work with enablerepo install_options for package resource

    XMLWordPrintable

    Details

    • Template:
    • Acceptance Criteria:
      Hide

      ensure => latest works with enablerepo install_options for package resource

      Show
      ensure => latest works with enablerepo install_options for package resource
    • Team:
      Agent
    • Story Points:
      1
    • Sprint:
      Agent 2017-05-31
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Puppet's yum package provider did not work for some versions of yum when both enablerepo and disablerepo options were specified, e.g. to enable specific repos, and disable all others.
    • QA Risk Assessment:
      No Action

      Description

      Consider the following situation:

      I want to update nodejs package to the latest version with Puppet. I have two repos - epel and nodesource - that contain the package. I want it to update using the nodesource repo.

      This is the manifest that I used:

      package { 'nodejs':
        ensure          => 'latest',
        install_options => [ {'--disablerepo' => '*', '--enablerepo' => 'nodesource'}],
      }
      

      I ran this manifest and it did nothing - doesn't work. The package was not updated. It works if I just do yum --disablerepo=* --enablerepo=nodesource update nodejs

       
      ========================================================================================
       Package        Arch           Version                         Repository          Size
      ========================================================================================
      Updating:
       nodejs         x86_64         1:4.5.0-1nodesource.el6         nodesource         8.7 M
       
      Transaction Summary
      ========================================================================================
      Upgrade       1 Package(s)
       
      Total download size: 8.7 M
      Is this ok [y/N]:
       
      
      

      Is this a normal behavior when using enablerepo with ensure => latest or is this a bug?

      Thanks.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              ali Ali Tukimin
              QA Contact:
              Eric Delaney
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support