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 23, 2018
1 parent 0e21436 commit 729261b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions files/debconf.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
icinga2-ido-pgsql icinga2-ido-pgsql/dbconfig-install boolean false
icinga2-ido-pgsql icinga2-ido-pgsql/enable boolean false
icinga2-ido-mysql icinga2-ido-mysql/dbconfig-install boolean false
icinga2-ido-mysql icinga2-ido-mysql/enable boolean false

1 change: 1 addition & 0 deletions manifests/feature/idopgsql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
if $ido_pgsql_package and $manage_package {
package { $ido_pgsql_package:
ensure => installed,
responsefile => '/var/cache/debconf/icinga2.cfg',
before => Icinga2::Feature['ido-pgsql'],
}
-> class { '::icinga2::debian::dbconfig':
Expand Down
13 changes: 12 additions & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,18 @@
$repositoryd = $::icinga2::repositoryd

if $manage_package {
if $::osfamily == 'windows' { Package { provider => chocolatey, } }
case $::osfamily {
'debian': {
file { '/var/cache/debconf/icinga2.cfg':
ensure => file,
source => 'puppet:///modules/icinga2/debconf.cfg',
}
Package { responsefile => '/var/cache/debconf/icinga2.cfg', }
} # Debian
'windows': {
Package { provider => chocolatey, }
} # Windows
}

package { $package:
ensure => installed,
Expand Down

0 comments on commit 729261b

Please sign in to comment.