example42 / puppet-yum

Puppet module for Yum
Other
43 stars 116 forks source link

Yum version and yum-cron #148

Closed username1366 closed 8 years ago

username1366 commented 8 years ago

Update yum package if enabled yum-cron because yum-cron doesn't work with yum version before 3.4.3-132 .

Error: Execution of '/bin/yum -d 0 -e 0 -y install yum-cron' returned 1: Transaction check error:
==> default:   file /etc/yum/yum-cron-hourly.conf from install of yum-cron-3.4.3-132.el7.centos.0.1.noarch conflicts with file from package yum-3.4.3-125.el7.centos.noarch
==> default:   file /etc/yum/yum-cron.conf from install of yum-cron-3.4.3-132.el7.centos.0.1.noarch conflicts with file from package yum-3.4.3-125.el7.centos.noarch
==> default: 
==> default: Error Summary
==> default: -------------

something like this in cron.pp:

  package { 'yum':
    ensure => latest,
  }
->
  package { 'yum-cron':
    ensure => $manage_update_package,
  }
geerlingguy commented 8 years ago

See: https://bugzilla.redhat.com/show_bug.cgi?id=1293513 — I hit this recently with some RHEL 7 servers managed by Ansible.

geerlingguy commented 8 years ago

Also note that simply running yum update (to update yum itself and other deps) seems to have resolved this issue, since the bug was fixed upstream.