2

I'm trying to install a few packages on CentOS 8 via cloud-init, like this:

package_upgrade: true

packages:
  - firewalld
  - htop

One of them one of them requires epel-release repo to be installed first:

No match for argument: htop
2019-10-21 15:50:35,444 - util.py[WARNING]: Failed to install packages: ['firewalld', 'htop']

How can I install epel-release first and then install packages?

Chef Tony
  • 351
  • 1
  • 2
  • 8
  • Have you tried adding `epel-release` to packages? Or you can probably just add it as `yum_repos` in cloud-init? – MichelZ Oct 24 '19 at 07:29

1 Answers1

3

Add this to your cloud init script:

yum_repos:
    epel-release:
        baseurl: http://download.fedoraproject.org/pub/epel/7/$basearch
        enabled: true
        failovermethod: priority
        gpgcheck: true
        gpgkey: http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
        name: Extra Packages for Enterprise Linux 7 - Release
MichelZ
  • 11,008
  • 4
  • 30
  • 58