Git Product home page Git Product logo

puppet-epel's Introduction

Configure EPEL (Extra Repository for Enterprise Linux)

Build Status Release Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores puppetmodule.info docs License

About

This module basically just mimics the epel-release rpm. The same repos are enabled/disabled and the GPG key is imported. In the end you will end up with the EPEL repos configured.

The following Repos will be setup and enabled by default:

  • epel

Other repositories that will setup but disabled (as per the epel-release setup)

  • epel-debuginfo
  • epel-source
  • epel-testing
  • epel-testing-debuginfo
  • epel-testing-source

Usage

In nearly all cases, you can simply include epel or classify your nodes with the epel class. There are quite a few parameters available if you need to modify the default settings for the epel repository such as having your own mirror, an http proxy, or disable gpg checking.

A list of all parameters is available in REFERENCE.md.

You can also use a puppet one-liner to get epel onto a system.

puppet apply -e 'include epel'

Proxy

If you have a http proxy required to access the internet, you can use either a class parameter in the epel class (epel_proxy), or edit the $proxy variable in the params.pp file. By default no proxy is assumed.

Why?

I am a big fan of EPEL. I actually was one of the people who helped get it going. I am also the owner of the epel-release package, so in general this module should stay fairly up to date with the official upstream package.

I just got sick of coding Puppet modules and basically having an assumption that EPEL was setup or installed. I can now depend on this module instead.

I realize it is fairly trivial to get EPEL setup. Every now-and-then however the path to epel-release changes because something changes in the package (mass rebuild, rpm build macros updates, etc). This module will bypass the changing URL and just setup the package mirrors.

This does mean that if you are looking for RPM macros that are normally included with EPEL release, this will not have them.

Further Information

Testing and Compatibility

  • This module is tested on CentOS 7 and 8 with Puppet 6 and Puppet 7.
  • It should work on any RHEL variant such as RedHat, OracleLinux, Scientific Linux etc.
  • Amazon Linux compatability is not promised, as EPEL doesn't always work with it.
  • Support for EL5 and EL6 is deprecated. It may still work but we have no acceptance tests.

Unit tests

Install the necessary gems

bundle install --path vendor --without system_tests

Run the RSpec and puppet-lint tests

bundle exec rake test

System tests

If you have Vagrant >=1.1.0 you can also run system tests:

RSPEC_SET=centos-64-x64 bundle exec rake spec:system

Available RSPEC_SET options are in .nodeset.yml

License

This module is distributed under the Apache License 2.0. Since version 3, it is maintained by Vox Pupuli.

Author/Contributors

Alternatives

If you're on CentOS 7 or CentOS 8, you can just yum install epel-release as it's in centos-extras.

puppet-epel's People

Contributors

alexharv074 avatar alexjfisher avatar bastelfreak avatar caphrim007 avatar cdenneen avatar ekohl avatar fschaer avatar h0tw1r3 avatar haus avatar kajinamit avatar maxadamo avatar mcanevet avatar metcalfc avatar msalway avatar ncstate-daniel avatar nehalrp avatar noodlesnz avatar proletaryo avatar rnelson0 avatar root-expert avatar sebastianrakel avatar siebrand avatar slapula avatar smortex avatar stahnma avatar tosmi avatar trevor-vaughan avatar treydock avatar zilchms avatar zipkid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-epel's Issues

Complete migration to Vox Pupuli

  • Update metadata.json
  • Plumbing PR and secret
  • Modulesync
  • Perform label sync
  • Update Readme acknowledging migration to VP
  • Create release summary ticket #111
  • Fix github license detection
  • Add badges
  • Move existing Changelog from README to HISTORY.MD
  • Perform first release
  • Deprecate old module (via JIRA ticket or API call)

no release for 0.1.0!

I don't see any reference to the recently released version 0.1.0 anywhere. Please to fix?

It's not possible to exclude packages

EPEL repositories have the functionality to exclude package names that you do not need to find (maybe because of there's duplicated name or similar issues), but puppet-module is not prepared to receive from hiera package names to exclude, they're been initialized to undef instead.

ssl connection error with 1.1.1 on RHEL 6.4

Hey Mike,

I'm seeing 1.1.1 fail on RHEL 6.4, but work on CentOS 6.4. The weird thing is, when I change the yum.repo from https to http, this module will work.. it will also reset my change to https and subsequent runs will be fine.

https became default in 1.1.1. I would think this module should be able to configure this ssl connection? Would you agree?

Alternatively would it be useful to have a "protocol" variable that defaults to https, that I could override to just use an insecure connection?

This is the error:

Error: Could not get latest version: Execution of '/usr/bin/python /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/provider/package/yumhelper.py' returned 1: Loaded plugins: product-id, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.
Could not retrieve mirrorlist https://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=x86_64 error was
14: problem making ssl connection
Traceback (most recent call last):
  File "/opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/provider/package/yumhelper.py", line 145, in <module>
    ypl = pkg_lists(my)
  File "/opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/provider/package/yumhelper.py", line 58, in pkg_lists
    my.doTsSetup()
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 84, in doTsSetup
    return self._getTs()
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
    self._getTsInfo(remove_only)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 669, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 308, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1256, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1455, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1451, in _getRepoXML
    raise Errors.RepoError, msg
yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

Release mismatch

Puppet Forge indicates release is 1.2.2, but latest release in GitHub is 1.2.1.

Lack of repository priority

I use the yum priorities plugin and set a priority for each yumrepo I set up. This package does not allow me to do this.

New fact breaks old functionality

The addition of ${::operatingsystemmajrelease} breaks on the current puppet provided CentOS 6.4 vagrant box which has:

# rpm -qa | grep -E 'puppet|facter'
facter-1.6.18-1.el6.x86_64
puppet-3.1.1-1.el6.noarch

The fact is empty, which errors out as:

==> default: Error: /Stage[main]/Epel/File[/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-]: Could not evaluate: Could not retrieve information from environment development source(s) puppet:///modules/epel/RPM-GPG-KEY-EPEL-

I realize Puppet-3.1.1 is a bit outdated, same with facter, however functionality should always be proven on the puppet provided vagrant instances.

Ability to install, but disable

Does this module have the ability to configure specific values in the epel.repo file? Such as having the ability to have the epel repo installed, but setting enabled=0 ?

Module contains invalid files.

Hey,

I installed this module and the puppet parser validate command gave me an error about a file called '._params.pp' so I listed the directory and saw:

[root@klynton ~/puppetcode/modules/epel/manifests:master±]# ls -la
total 32
drwxr-xr-x 2 root root 4096 Dec 11 18:25 .
drwxr-xr-x 6 root root 4096 Dec  4 23:10 ..
-r--r--r-- 1 root root 6998 Dec  4 23:09 init.pp
-r--r--r-- 1 root root  280 Dec  4 23:09 ._params.pp
-r--r--r-- 1 root root 2745 Dec  4 23:09 params.pp
-r--r--r-- 1 root root  280 Dec  4 23:09 ._rpm_gpg_key.pp
-r--r--r-- 1 root root  779 Dec  4 23:09 rpm_gpg_key.pp

When I actually look at one of these files its contents look like:

[root@klynton ~/puppetcode/modules:master±]# cat /root/puppetcode/modules/epel/tests/._init.pp
Mac OS X            2?ATTR????com.apple.acl.text!#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity

GPG key isn't required to be present before the repositories

The outcome from #72 and #73 means that the GPG key now isn't guaranteed to be imported before the Yum repositories are created which means if I install a package found in these repositories, I get the following errors:

GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7"

And then a bit further on, I finally see the GPG key get created:

Notice: /Stage[main]/Epel/File[/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7]/ensure: defined content as '{md5}58fa8ae27c89f37b08429f04fd4a88cc'
Notice: /Stage[main]/Epel/Epel::Rpm_gpg_key[EPEL-7]/Exec[import-EPEL-7]/returns: executed successfully

I agree the original dependency chaining was a bit far reaching, but I think there needs to be something here to keep the resources within the context of this module in the correct order.

https://github.com/stahnma/puppet-module-epel/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

Getting the following error on yum install epel-release. The epel.repo is pointing to the correct GitHub repo. I also added the repo-gpgcheck=0 to epel.repo so it does not worry about checking the gpg keys. but I still get the same error. Seems the repo is having incorrect "repomd.xml".

https://github.com/stahnma/puppet-module-epel/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

Here is the complete output.

yum install epel-release

Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
https://github.com/stahnma/puppet-module-epel/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

One of the configured repositories failed (Puppet EPEL Repo),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=epel ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable epel
    or
       subscription-manager repos --disable=epel

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=epel.skip_if_unavailable=true

failure: repodata/repomd.xml from epel: [Errno 256] No more mirrors to try.
https://github.com/stahnma/puppet-module-epel/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

proxy = 'absent' breaks EPEL

It seems something has changed related to this: https://github.com/stahnma/puppet-module-epel/blob/f1571920d057b069bc8f66fef88ed91fb0a4821a/manifests/params.pp#L3-L9

$ cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

$ sudo yum makecache
Loaded plugins: fastestmirror, versionlock
Repository 'epel-testing': Error parsing config: Error parsing "proxy = 'absent'": URL must be http, ftp, https, socks4, socks4a, socks5 or socks5h not ""
Repository 'epel-testing-debuginfo': Error parsing config: Error parsing "proxy = 'absent'": URL must be http, ftp, https, socks4, socks4a, socks5 or socks5h not ""
Repository 'epel-testing-source': Error parsing config: Error parsing "proxy = 'absent'": URL must be http, ftp, https, socks4, socks4a, socks5 or socks5h not ""
Repository 'epel': Error parsing config: Error parsing "proxy = 'absent'": URL must be http, ftp, https, socks4, socks4a, socks5 or socks5h not ""
Repository 'epel-debuginfo': Error parsing config: Error parsing "proxy = 'absent'": URL must be http, ftp, https, socks4, socks4a, socks5 or socks5h not ""
Repository 'epel-source': Error parsing config: Error parsing "proxy = 'absent'": URL must be http, ftp, https, socks4, socks4a, socks5 or socks5h not ""

Developing with Ruby 2.3 using puppet 3 as a gem :(

😢

[0] stahnma@hart ~/puppet-module-epel [master]> bundle exec rake -T [DEPRECATION]last_commentis deprecated. Please uselast_descriptioninstead. [DEPRECATION]last_commentis deprecated. Please uselast_descriptioninstead. [DEPRECATION]last_commentis deprecated. Please uselast_descriptioninstead. rake aborted! NameError: uninitialized constant Syck /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb:42:in<top (required)>'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:197:in require' /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:197:inmodule:YAML'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:132:in <top (required)>' /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet/vendor/require_vendored.rb:4:inrequire'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet/vendor/require_vendored.rb:4:in <top (required)>' /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet/vendor.rb:40:inrequire'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet/vendor.rb:40:in require_libs' /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet/vendor.rb:53:inload_vendored'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet.rb:174:in <module:Puppet>' /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-3.8.7/lib/puppet.rb:29:in<top (required)>'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-syntax-2.1.0/lib/puppet-syntax/templates.rb:2:in require' /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-syntax-2.1.0/lib/puppet-syntax/templates.rb:2:in<top (required)>'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-syntax-2.1.0/lib/puppet-syntax.rb:3:in require' /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-syntax-2.1.0/lib/puppet-syntax.rb:3:in<top (required)>'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-syntax-2.1.0/lib/puppet-syntax/tasks/puppet-syntax.rb:1:in require' /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppet-syntax-2.1.0/lib/puppet-syntax/tasks/puppet-syntax.rb:1:in<top (required)>'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppetlabs_spec_helper-1.1.1/lib/puppetlabs_spec_helper/rake_tasks.rb:324:in require' /home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/puppetlabs_spec_helper-1.1.1/lib/puppetlabs_spec_helper/rake_tasks.rb:324:in<top (required)>'
/home/stahnma/puppet-module-epel/Rakefile:4:in require' /home/stahnma/puppet-module-epel/Rakefile:4:in<top (required)>'
/home/stahnma/puppet-module-epel/vendor/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in <top (required)>' (See full trace by running task with --trace)

With the last update of epel-release-7 baseurl is not used any more

With the last package update, base url was replaced by metalink.

[epel-testing]
name=Extra Packages for Enterprise Linux 7 - Testing - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/testing/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-epel7&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

But the module will use the old baseurl.

version 1.3.1 causing catalog failure problem

Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Could not find template 'epel/RPM-GPG-KEY-EPEL-2018.erb' (file: /etc/puppetlabs/code/environments/test/modules/epel/manifests/init.pp, line: 248, column: 18) on node test.node.local

Release v2.0.0

  • Depends on #60
  • Update Changelog
  • Bump version number
  • Publish to the forge

RPM gpg import looks broken on CentOS 6

debug: Exec[import-EPEL-6](provider=posix): Executing check 'rpm -q gpg-pubkey-`$(echo $(gpg --throw-keyids < /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6) | cut --characters=11-18 | tr [A-Z] [a-z])`'
debug: Executing 'rpm -q gpg-pubkey-`$(echo $(gpg --throw-keyids < /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6) | cut --characters=11-18 | tr [A-Z] [a-z])`'
debug: /Stage[main]/Epel/Epel::Rpm_gpg_key[EPEL-6]/Exec[import-EPEL-6]/unless: sh: 0608b895: command not found
debug: /Stage[main]/Epel/Epel::Rpm_gpg_key[EPEL-6]/Exec[import-EPEL-6]/unless: gpg-pubkey-c105b9de-4e0fd3a3
debug: /Stage[main]/Epel/Epel::Rpm_gpg_key[EPEL-6]/Exec[import-EPEL-6]/unless: gpg-pubkey-0608b895-4bd22942

Bash concurs:

[root@localhost ~]# rpm -q gpg-pubkey-`$(echo $(gpg --throw-keyids < /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6) | cut --characters=11-18 | tr [A-Z] [a-z])`
-bash: 0608b895: command not found
gpg-pubkey-c105b9de-4e0fd3a3
gpg-pubkey-0608b895-4bd22942

Clearly the echo is working:

[root@localhost ~]# echo $(gpg --throw-keyids < /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6) | cut --characters=11-18 | tr [A-Z] [a-z]
0608b895

The rpm query works as well given the key directly:

[root@localhost ~]# rpm -q gpg-pubkey-0608b895
gpg-pubkey-0608b895-4bd22942

It looks like you've got an extra ).

[root@localhost ~]# rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids < /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6) | cut --characters=11-18 | tr [A-Z] [a-z])
gpg-pubkey-0608b895-4bd22942

Add HTTPS configuration option

I've noticed in the latest epel-release RPM, they default to using HTTPS URLs. However the files installed by this Puppet module default to non-SSL URLs. I'd recommend adding an option for HTTPS urls.

Changes made to a RHEL 7 system that has the epel-release rpm installed

Hi,

I have installed this module because it is a dependency of the edestecd/clamav module, but I decided to set manage_repo to false because on the first (--noop) run, I saw that it was planning to do changes on my system. Is that to be expected? Why?

Logs:

Notice: /Stage[main]/Epel/Yumrepo[epel-testing-debuginfo]/baseurl: current_value absent, should be https://download.fedoraproject.org/pub/epel/testing/7/$basearch/debug (noop)
Notice: /Stage[main]/Epel/Yumrepo[epel-source]/mirrorlist: current_value https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch, should be https://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-7&arch=$basearch (noop)
Notice: /Stage[main]/Epel/Yumrepo[epel]/mirrorlist: current_value https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch, should be https://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=$basearch (noop)
Notice: /Stage[main]/Epel/Yumrepo[epel-testing-source]/baseurl: current_value absent, should be https://download.fedoraproject.org/pub/epel/testing/7/SRPMS (noop)
Notice: /Stage[main]/Epel/Yumrepo[epel-debuginfo]/mirrorlist: current_value https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch, should be https://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-7&arch=$basearch (noop)
Notice: /Stage[main]/Epel/Yumrepo[epel-testing]/descr: current_value Extra Packages for Enterprise Linux 7 - Testing - $basearch, should be Extra Packages for Enterprise Linux 7 - Testing - $basearch (noop)
Notice: /Stage[main]/Epel/Yumrepo[epel-testing]/baseurl: current_value absent, should be https://download.fedoraproject.org/pub/epel/testing/7/$basearch (noop)

Updated RHEL 7 system (7.2) with epel-release-7-5

Thanks,

Not compatible with Puppet 3.5.0

After updating to Puppet 3.5.0, I get this error message.

Error: Failed to apply catalog: Parameter proxy failed on Yumrepo[epel-testing]: Must be a valid URL at /etc/puppet/modules/epel/manifests/init.pp:24

This might be a regression in puppet, because the docs say that absent is acceptable, instead of a well formed URL. http://docs.puppetlabs.com/references/latest/type.html#yumrepo-attribute-proxy

As a workaround, I have commented out the "proxy" lines in the EPEL module in my installation, and that allows the puppet run to succeed.

Setting baseurl

If I specify a epel_baseurl should the module still be inserting a mirrorlist in the repo file? Is it known how yum handles having both a baseurl and a mirrorlist? Will it always prefer baseurl and failover to mirrorlist? Will it still build a fastest mirror cache?

I'm trying to specify a local epel mirror and stop yum from connecting out to external sources (if possible).

Thanks

Module does not allow the management on Amazon Linux

When running on Amazon Linux the module only calls the yumrepo resource with the 'enabled' and 'gpgcheck' parameters. You are unable to configure anything else, is there a reason for this? I need to be able to set my baseurl, mirrorlist, and a few others on Amazon Linux instances.

Add compatibility with RHEL8/CentOS 8

Trying to get this module working with CentOS 8, I'm running into the following issue:

  Could not retrieve catalog from remote server: Error 500 on SERVER:
  Server Error: Evaluation Error:
  Error while evaluating a Function Call, Could not find template 'epel/RPM-GPG-KEY-EPEL-8.erb'
  (file: /etc/puppetlabs/code/environments/production/modules/epel/manifests/init.pp, line: 224, column: 18)

It looks like work is underway in #87.

Description changes on every puppet run

We're seeing 6 changes made every single time puppet runs with the epel package applied. See the log below:

Notice: /Stage[main]/Epel/Yumrepo[epel-testing-debuginfo]/descr: descr changed 'Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Debug' to 'Extra Packages for Enterprise Linux 5 - Testing - $basearch - Debug'
Notice: /Stage[main]/Epel/Yumrepo[epel-source]/descr: descr changed 'Extra Packages for Enterprise Linux 5 - x86_64 - Source' to 'Extra Packages for Enterprise Linux 5 - $basearch - Source'
Notice: /Stage[main]/Epel/Yumrepo[epel]/descr: descr changed 'Extra Packages for Enterprise Linux 5 - x86_64' to 'Extra Packages for Enterprise Linux 5 - $basearch'
Notice: /Stage[main]/Epel/Yumrepo[epel-testing-source]/descr: descr changed 'Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Source' to 'Extra Packages for Enterprise Linux 5 - Testing - $basearch - Source'
Notice: /Stage[main]/Epel/Yumrepo[epel-debuginfo]/descr: descr changed 'Extra Packages for Enterprise Linux 5 - x86_64 - Debug' to 'Extra Packages for Enterprise Linux 5 - $basearch - Debug'
Notice: /Stage[main]/Epel/Yumrepo[epel-testing]/descr: descr changed 'Extra Packages for Enterprise Linux 5 - Testing - x86_64 ' to 'Extra Packages for Enterprise Linux 5 - Testing - $basearch '

Not sure if this is a problem with the yumrepo type or with the epel module. I think that the "$basearch" is being written out in its expanded form in the repo file, and so puppet sees that it's different and tries to change it back.

Have you experienced this before? It makes troubleshooting things that changed very difficult.

Handling TLS/SSL cert. issues for EPEL repo. mirrors

Hello,

Currently, I'm experiencing the following errors:

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install java-1.7.0-openjdk-devel' returned 1: Error: Cannot find a valid baseurl for repo: epel Could not retrieve mirrorlist https://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=x86_64 error was 14: problem making ssl connection

Please note that I am aware that this is NOT a limitation of the epel Puppet Module

However, I am curious as to whether or not such a case might warrant any modifications in relation to overriding TLS/SSL verification within the .repo file.

If this is not useful (due to this approach being deprecated in CentOS 7.x releases or due to it being related to remote or local environments rather than the Module itself), then please disregard this.

Thank you very much.

Module does not expose the repo_gpgcheck parameter

The EPEL repositories appear to not publish signed metadata, so if one enables repo_gpgcheck in yum.conf, as suggested or mandated by some system security policies, the repository will be unavailable and yum will fail:

.../repodata/repomd.xml.asc: [Errno 14] HTTPS Error 404 - Not Found

A workaround is to manually add "repo_gpgcheck=0" to epel.repo.

Yumrepo changes in puppet 3.5 break proxy

Parameter proxy failed on Yumrepo[epel-testing]: Must be a valid URL at /etc/puppet/modules/epel/manifests/init.pp:57

If not overridden, the value of proxy here is 'absent', which is not a valid URL.

Issue with custom puppet fact `os_maj_version`

There seems to be an issue with the custom fact os_maj_version. I tried to use this module as-is the other day and it wouldn't work with that fact on some Vagrant VMs (CentOS 6.4) I was playing with. I had to change all occurrences of os_maj_version to operatingsystemmajrelease to get it working. I did a little research and it looks like operatingsystemmajrelease was introduced with Facter 1.7 and eliminates the need for the custom fact. If it's just a matter of replacing all occurrences of os_maj_version with operatingsystemmajrelease, I have a fork that I've already done that to and can submit a pull request. If there's any information missing here, let me know and I'll do my best to provide it.

stahnma-epel ships Apple resource forks

version: 0.1.0

$ find epel/ -type f -exec file {} \;|grep -v .svn|egrep -i 'apple|Macintosh'
epel/._manifests: AppleDouble encoded Macintosh file
epel/._metadata.json: AppleDouble encoded Macintosh file
epel/._spec: AppleDouble encoded Macintosh file
epel/tests/._init.pp: AppleDouble encoded Macintosh file
epel/._Gemfile: AppleDouble encoded Macintosh file
epel/._LICENSE: AppleDouble encoded Macintosh file
epel/._Rakefile: AppleDouble encoded Macintosh file
epel/._tests: AppleDouble encoded Macintosh file
epel/._files: AppleDouble encoded Macintosh file
epel/._README.md: AppleDouble encoded Macintosh file
epel/files/._RPM-GPG-KEY-EPEL-6: AppleDouble encoded Macintosh file
epel/files/._RPM-GPG-KEY-EPEL-5: AppleDouble encoded Macintosh file
epel/files/._RPM-GPG-KEY-EPEL-7: AppleDouble encoded Macintosh file
epel/._Modulefile: AppleDouble encoded Macintosh file
epel/spec/._system: AppleDouble encoded Macintosh file
epel/spec/system/._basic_spec.rb: AppleDouble encoded Macintosh file
epel/spec/system/._usage_spec.rb: AppleDouble encoded Macintosh file
epel/spec/._spec_helper_system.rb: AppleDouble encoded Macintosh file
epel/spec/unit/._facter: AppleDouble encoded Macintosh file
epel/spec/unit/facter/._os_maj_version_spec.rb: AppleDouble encoded Macintosh file
epel/spec/._classes: AppleDouble encoded Macintosh file
epel/spec/classes/._shared_base.rb: AppleDouble encoded Macintosh file
epel/spec/classes/._shared_testing.rb: AppleDouble encoded Macintosh file
epel/spec/classes/._shared_gpgkey.rb: AppleDouble encoded Macintosh file
epel/spec/classes/._shared_source.rb: AppleDouble encoded Macintosh file
epel/spec/classes/._shared_testing_source.rb: AppleDouble encoded Macintosh file
epel/spec/classes/._shared_testing_debuginfo.rb: AppleDouble encoded Macintosh file
epel/spec/classes/._epel_spec.rb: AppleDouble encoded Macintosh file
epel/spec/classes/._shared_debuginfo.rb: AppleDouble encoded Macintosh file
epel/spec/defines/._rpm_gpg_key_spec.rb: AppleDouble encoded Macintosh file
epel/spec/._defines: AppleDouble encoded Macintosh file
epel/spec/._unit: AppleDouble encoded Macintosh file
epel/spec/._spec_helper.rb: AppleDouble encoded Macintosh file
epel/._lib: AppleDouble encoded Macintosh file
epel/lib/._facter: AppleDouble encoded Macintosh file
epel/lib/facter/._os_maj_version.rb: AppleDouble encoded Macintosh file
epel/manifests/._rpm_gpg_key.pp: AppleDouble encoded Macintosh file
epel/manifests/._init.pp: AppleDouble encoded Macintosh file
epel/manifests/._params.pp: AppleDouble encoded Macintosh file

epel mirrorlist - metalink vs mirrorlist

I'm currently installing python34 and python34-virtualenv using the epel repositories provided by this module.
Current issue experiencing right now is that python34-virtualenv is not available. Checked and there was a minor difference between the epel repo provided by this module and the epel-release package

[epel provided by this module]
mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=$basearch

[epel-release package]
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch

Changing the mirrorlist url to metalink is able to install python34-virtualenv, as well as setuptools.

Just wanted to raise this if ever a change should be made in this module to change 'mirrorlist' to 'metalink', or if something has changed with the epel repos themselves.

Release v1.3.0

  • Mark this as the last version supporting Puppet 3
  • Update Changelog
  • Bump version number
  • Publish to the forge

Version 1.3.0 of stahnma/epel creates a dependency cycle when Yumrepo resources are declared in different run stages

The changes in #68 added an unfiltered resource collector that makes all Yumrepo instances depend on the EPEL GPG key:

Epel::Rpm_gpg_key <| |> -> Yumrepo <| |>

This will result in a dependency cycle if any Yumrepo resource is declared in a run stage that occurs before the stage containing Class[Epel] and also creates an unnecessary dependency for any repo that doesn't use the EPEL GPG key.

Puppet Enterprise compile masters use such a stage to ensure the PE repositories are configured before Stage[main] kicks off. Adding the Epel from 1.3.0 to a PE compiler results in a dependency cycle:

[root@pe-201732-agent ~]# puppet agent -t --graph


Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for pe-201732-agent.puppetdebug.vlan
Info: Applying configuration version '1515018145'
Error: Found 1 dependency cycle:
(Exec[import-EPEL-7] => Epel::Rpm_gpg_key[EPEL-7] => Yumrepo[pe_repo] => Class[Puppet_enterprise::Repo::Config] => Stage[pe_setup] => Stage[main] => Class[Epel] => File[/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7] => Exec[import-EPEL-7])
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz
Error: Failed to apply catalog: One or more resource dependency cycles detected in graph

Class switches for enabling other EPEL repositories?

It would be nice to have the ability to enable other repositories through Puppet. For example, it would be nice to be able to enable epel-testing and then have a package set to latest to upgrade packages from a testing repo without having to log into the server.

Would you be open to a pull request with this functionality if I get frisky and add it?

key import check command should explicitly force key format to expected format

I finally had time to check why I got a notice on every run that the key has been reimported. Turns out the reason is I have configured gnupg to always print key ids as 0xlong instead of short as expected by the unless statement.

The statement in rpm_gpg_key.pp should look like this to override the config file setting:

unless    => "rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids --keyid-format short < ${path}) | cut --characters=11-18 | tr '[A-Z]' '[a-z]')",

Works for me on CentOS 6 and CentOS 7.

License File

Could you add a License File to the repo, please?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.