Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To use pkgrepo.managed instead of file.replace for disable or enable repo #34

Open
alisson276 opened this issue Apr 19, 2017 · 2 comments

Comments

@alisson276
Copy link

Using file.replace to disable or enable EPEL repo has a problem because in the file /etc/yum.repos.d/epel.repo there are 3 repos, not just 1. So, if pillar "epel:disabled" is False the repos epel, epel-debuginfo and epel-source are enabled when I just wanna enable epel repo.

@alisson276
Copy link
Author

Some like this:

disable_epel:
  pkgrepo.managed:
    - name: epel
    - enabled: False

m2mobi-mirror pushed a commit to move-sysadmin/epel-formula that referenced this issue Nov 9, 2018
@myii
Copy link
Member

myii commented Sep 19, 2019

The basis of a potential solution using pkgrepo.managed only (for amazonlinux-2 in this situation):

openvpn_external_repo:
  pkgrepo.managed:
    - name: epel
    - humanname: Extra Packages for Enterprise Linux 7 - $basearch
    - mirrorlist: https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
    - enabled: 1
    - gpgcheck: 1
    - gpgkey: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
    - failovermethod: priority
    - require_in:
      - pkg: openvpn_pkgs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants