Skip to content

Commit

Permalink
add missing EPEL repo on RedHat to documentation, examples and beaker…
Browse files Browse the repository at this point in the history
… acceptance tests
  • Loading branch information
lbetz committed Jan 8, 2020
1 parent ca63efb commit aba7283
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 3 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ class { '::icinga2':
manage_repo => true,
}
```
*Notice*: Since Icinga v2.11.0 on RedHat the EPEL-Repository is required to install the Boost libraries. EPEL is NOT managed by this module so you have to do this on your own in front of icinga2 class, e.g. as `yum_repo` or if you've an internet connection as a simple package resource like:

``` puppet
package { 'epel-release': }
class { '::icinga2':
manage_repo => true,
}
```

*Info:* If you are using the [Icinga Web 2](https://github.com/Icinga/puppet-icingaweb2/) Puppet module on the same
server, make sure to disable the repository management for one of the modules!
Expand Down Expand Up @@ -625,7 +634,7 @@ It's not currently possible to use arrays or dictionaries in a string, like

#### Reading objects from hiera data

The following example is for puppet 4 and higher. It shows how icinga2 objects can be read from
The following example shows how icinga2 objects can be read from
a hiera datastore. See also examples/objects_from_hiera.pp.

```
Expand Down
6 changes: 6 additions & 0 deletions examples/example4/profile/manifests/agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

contain ::profile::icinga2::plugins

case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { '::icinga2':
manage_repo => true,
confd => false,
Expand Down
6 changes: 6 additions & 0 deletions examples/example4/profile/manifests/master.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

contain ::profile::icinga2::plugins

case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { '::icinga2':
manage_repo => true,
purge_features => false,
Expand Down
6 changes: 6 additions & 0 deletions examples/example4/profile/manifests/slave.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

contain ::profile::icinga2::plugins

case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { '::icinga2':
manage_repo => true,
confd => false,
Expand Down
6 changes: 6 additions & 0 deletions examples/init_api.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { 'icinga2':
manage_repo => true,
}
Expand Down
6 changes: 6 additions & 0 deletions examples/init_confd.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { 'icinga2':
manage_repo => true,
confd => '/etc/icinga2/local.d',
Expand Down
6 changes: 6 additions & 0 deletions examples/init_idomysql.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

include ::mysql::server

mysql::db { 'icinga2':
Expand Down
6 changes: 6 additions & 0 deletions examples/init_idomysql_ssl.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

file { '/etc/mysql':
ensure => directory,
}
Expand Down
6 changes: 6 additions & 0 deletions examples/init_idopgsql.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

include ::postgresql::server

postgresql::server::db { 'icinga2':
Expand Down
6 changes: 6 additions & 0 deletions examples/init_influxdb.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { 'icinga2':
manage_repo => true,
}
Expand Down
6 changes: 6 additions & 0 deletions examples/init_master.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { '::icinga2':
manage_repo => true,
constants => {
Expand Down
6 changes: 6 additions & 0 deletions examples/init_plugins.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { 'icinga2':
manage_repo => true,
plugins => [ 'plugins', 'plugins-contrib', 'windows-plugins', 'nscp' ]
Expand Down
12 changes: 12 additions & 0 deletions examples/init_repo.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { 'icinga2':
manage_repo => true,
}
6 changes: 6 additions & 0 deletions examples/init_slave.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

$master_cert = 'master.localdomain'
$master_ip = '192.168.5.16'

Expand Down
6 changes: 6 additions & 0 deletions examples/init_slave_validate.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

$master_cert = 'master.localdomain'
$master_ip = '192.168.5.12'

Expand Down
6 changes: 6 additions & 0 deletions examples/init_syslog.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { 'icinga2':
manage_repo => true,
}
Expand Down
5 changes: 5 additions & 0 deletions examples/objects_from_hiera.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
# - generic-service
# target: /etc/icinga2/conf.d/services.conf

case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}

class { 'icinga2':
manage_repo => true,
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.16.0 < 7.0.0"
"version_requirement": ">= 5.0.0 < 7.0.0"
},
{
"name": "puppetlabs/concat",
Expand Down
5 changes: 5 additions & 0 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
describe 'with API, IDO mysql and pgsql' do
let(:pp) do
<<-MANIFEST
case $::osfamily {
'redhat': {
package { 'epel-release': }
} # RedHat
}
class { 'icinga2':
manage_repo => true,
constants => {
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'beaker/puppet_install_helper'

# Install Puppet on all hosts
install_puppet_agent_on(hosts, options)
install_puppet_agent_on(hosts, :puppet_collection => 'puppet5')

RSpec.configure do |c|
module_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
Expand Down

0 comments on commit aba7283

Please sign in to comment.