diff --git a/README.md b/README.md index b328d7925..c64e296bb 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,9 @@ These are now documented via [Puppet Strings](https://github.com/puppetlabs/pupp You can view example usage in [REFERENCE](REFERENCE.md). -**[puppet/epel](https://forge.puppet.com/modules/puppet/epel) is a soft dependency. The module requires it if you're on CentOS 7** +**[puppet/epel](https://forge.puppet.com/modules/puppet/epel) is a soft dependency. If you're on CentOS 7 and don't want to require it, set `$require_epel` to `false`** -Version v13.2.0 and older also added an erlang repository on CentOS 7. That isn't used and can be safely removed. +Version v13.2.0 and older also added an erlang module on CentOS 7. That isn't used and can be safely removed. ## Reference diff --git a/REFERENCE.md b/REFERENCE.md index 498c0ac82..19418cfcb 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -254,6 +254,7 @@ The following parameters are available in the `rabbitmq` class: * [`port`](#-rabbitmq--port) * [`python_package`](#-rabbitmq--python_package) * [`repos_ensure`](#-rabbitmq--repos_ensure) +* [`require_epel`](#-rabbitmq--require_epel) * [`service_ensure`](#-rabbitmq--service_ensure) * [`service_manage`](#-rabbitmq--service_manage) * [`service_name`](#-rabbitmq--service_name) @@ -800,6 +801,14 @@ different ways of handling the erlang deps. See also https://github.com/voxpupu Default value: `false` +##### `require_epel` + +Data type: `Boolean` + +If this parameter is set, On CentOS / RHEL 7 systems, require the "epel" module + +Default value: `true` + ##### `service_ensure` Data type: `Enum['running', 'stopped']` diff --git a/manifests/init.pp b/manifests/init.pp index 942cbe1c2..8c14861a6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -243,6 +243,8 @@ # Defaults to false (use system packages). This does not ensure that soft dependencies (like EPEL on RHEL systems) are present. # It also does not solve the erlang dependency. See https://www.rabbitmq.com/which-erlang.html for a good breakdown of the # different ways of handling the erlang deps. See also https://github.com/voxpupuli/puppet-rabbitmq/issues/788 +# @param require_epel +# If this parameter is set, On CentOS / RHEL 7 systems, require the "epel" module # @param service_ensure # The state of the service. # @param service_manage @@ -453,6 +455,7 @@ Array $archive_options = [], Array $loopback_users = ['guest'], Boolean $service_restart = true, + Boolean $require_epel = true, ) { if $ssl_only and ! $ssl { fail('$ssl_only => true requires that $ssl => true') @@ -507,7 +510,12 @@ default: { } } - } elsif ($facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7') { + } elsif ($facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7') and $require_epel { + # On later CentOS / RHEL systems, this is not useful since EPEL doesn't + # have the rabbitmq-server package anyway. + # + # Once support for 7 is dropped, we should remove this code and the + # parameter require epel }