Skip to content

Commit

Permalink
fix #500 ido-pgsql db import fails on debian
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Nov 27, 2018
2 parents 55a66fa + e36a767 commit 712af2e
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 96 deletions.
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Florian Baumann <[email protected]>
Gunnar Beutner <[email protected]>
James Fryman <[email protected]>
Jan-Otto Kröpke <[email protected]>
Jerome Charaoui <[email protected]>
Lennart Betz <[email protected]>
Markus Frosch <[email protected]>
Matthias Ritter <[email protected]>
Expand All @@ -27,3 +28,4 @@ Tom De Vylder <[email protected]>
Tomas Barton <[email protected]>
Wyatt Alt <[email protected]>
Zach Leslie <[email protected]>
murmur <[email protected]>
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Change Log

## [v1.3.6](https://github.com/Icinga/puppet-icinga2/tree/v1.3.6) (2018-04-25)
[Full Changelog](https://github.com/Icinga/puppet-icinga2/compare/v1.3.5...v1.3.6)

**Implemented enhancements:**

- Add support for SLC6 Linux [\#441](https://github.com/Icinga/puppet-icinga2/pull/441) ([HristoMohamed](https://github.com/HristoMohamed))
- Support manage\_repo on XenServer [\#436](https://github.com/Icinga/puppet-icinga2/pull/436) ([jcharaoui](https://github.com/jcharaoui))

**Fixed bugs:**

- Changes on concat resource for objects does not trigger a refresh on puppet3 [\#434](https://github.com/Icinga/puppet-icinga2/issues/434)
- don't quote null [\#433](https://github.com/Icinga/puppet-icinga2/issues/433)

**Closed issues:**

- Using apply in a service causes service\_name not to be applied to service leading to duplicate resource issues [\#429](https://github.com/Icinga/puppet-icinga2/issues/429)
- Applying services to hostgroups [\#427](https://github.com/Icinga/puppet-icinga2/issues/427)

**Merged pull requests:**

- Bug/do not quote null 433 [\#435](https://github.com/Icinga/puppet-icinga2/pull/435) ([lbetz](https://github.com/lbetz))

## [v1.3.5](https://github.com/Icinga/puppet-icinga2/tree/v1.3.5) (2018-01-24)
[Full Changelog](https://github.com/Icinga/puppet-icinga2/compare/v1.3.4...v1.3.5)

Expand Down Expand Up @@ -548,4 +570,4 @@
## [v0.6.1](https://github.com/Icinga/puppet-icinga2/tree/v0.6.1) (2014-12-03)


\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
72 changes: 0 additions & 72 deletions manifests/debian/dbconfig.pp

This file was deleted.

26 changes: 15 additions & 11 deletions manifests/feature/idomysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -280,23 +280,27 @@
failover_timeout => $failover_timeout,
cleanup => $cleanup,
categories => $categories,

}

# install additional package
if $ido_mysql_package_name and $manage_package {
package { $ido_mysql_package_name:
if $ido_mysql_package and $manage_package {
if $::osfamily == 'debian' {
ensure_resources('file', { '/etc/dbconfig-common' => {
ensure => directory,
mode => '0755',
} })
file { "/etc/dbconfig-common/${ido_mysql_package}.conf":
ensure => file,
content => "dbc_install='false'\ndbc_upgrade='false'\ndbc_remove='false'\n",
mode => '0600',
before => Package[$ido_mysql_package],
}
} # Debian

package { $ido_mysql_package:
ensure => installed,
before => Icinga2::Feature['ido-mysql'],
}
-> class { '::icinga2::debian::dbconfig':
dbtype => 'mysql',
dbserver => $host,
dbport => $port,
dbname => $database,
dbuser => $user,
dbpass => $password,
}
}

# import db schema
Expand Down
25 changes: 15 additions & 10 deletions manifests/feature/idopgsql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,24 @@
}

# install additional package
if $ido_pgsql_package_name and $manage_package {
package { $ido_pgsql_package_name:
if $ido_pgsql_package and $manage_package {
if $::osfamily == 'debian' {
ensure_resources('file', { '/etc/dbconfig-common' => {
ensure => directory,
mode => '0755',
} })
file { "/etc/dbconfig-common/${ido_pgsql_package}.conf":
ensure => file,
content => "dbc_install='false'\ndbc_upgrade='false'\ndbc_remove='false'\n",
mode => '0600',
before => Package[$ido_pgsql_package],
}
} # Debian

package { $ido_pgsql_package:
ensure => installed,
before => Icinga2::Feature['ido-pgsql'],
}
-> class { '::icinga2::debian::dbconfig':
dbtype => 'pgsql',
dbserver => $host,
dbport => $port,
dbname => $database,
dbuser => $user,
dbpass => $password,
}
}

# import db schema
Expand Down
2 changes: 1 addition & 1 deletion manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
case $::osfamily {
'redhat': {
case $::operatingsystem {
'centos', 'redhat', 'oraclelinux', 'cloudlinux', 'xenserver': {
'centos', 'redhat', 'oraclelinux', 'cloudlinux', 'xenserver', 'slc': {
yumrepo { 'icinga-stable-release':
baseurl => "http://packages.icinga.com/epel/${::operatingsystemmajrelease}/release/",
descr => 'ICINGA (stable release for epel)',
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "icinga-icinga2",
"version": "1.3.5",
"version": "1.3.6",
"author": "Icinga Development Team",
"summary": "Icinga 2 Puppet Module",
"license": "Apache-2.0",
Expand Down

0 comments on commit 712af2e

Please sign in to comment.