Skip to content

Commit

Permalink
Merge pull request #604 from Icinga/debian10-support
Browse files Browse the repository at this point in the history
Debian10 support
  • Loading branch information
lbetz authored Jan 13, 2020
2 parents 61c8598 + ca77582 commit 07c94f3
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 3 deletions.
4 changes: 3 additions & 1 deletion manifests/feature/idomysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,12 @@
# install additional package
if $ido_mysql_package_name and $manage_package {
if $::osfamily == 'debian' {
ensure_resources('file', { '/etc/dbconfig-common' => { ensure => directory } })
ensure_resources('file', { '/etc/dbconfig-common' => { ensure => directory, owner => 'root', group => 'root' } })
file { "/etc/dbconfig-common/${ido_mysql_package_name}.conf":
ensure => file,
content => "dbc_install='false'\ndbc_upgrade='false'\ndbc_remove='false'\n",
owner => 'root',
group => 'root',
mode => '0600',
before => Package[$ido_mysql_package_name],
}
Expand Down
4 changes: 3 additions & 1 deletion manifests/feature/idopgsql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@
# install additional package
if $ido_pgsql_package_name and $manage_package {
if $::osfamily == 'debian' {
ensure_resources('file', { '/etc/dbconfig-common' => { ensure => directory } })
ensure_resources('file', { '/etc/dbconfig-common' => { ensure => directory, owner => 'root', group => 'root' } })
file { "/etc/dbconfig-common/${ido_pgsql_package_name}.conf":
ensure => file,
content => "dbc_install='false'\ndbc_upgrade='false'\ndbc_remove='false'\n",
owner => 'root',
group => 'root',
mode => '0600',
before => Package[$ido_pgsql_package_name],
}
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"operatingsystemrelease": [
"7",
"8",
"9"
"9",
"10"
]
},
{
Expand Down
12 changes: 12 additions & 0 deletions spec/acceptance/nodesets/debian-buster-amd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
HOSTS:
i2debian10:
roles:
- agent
- default
platform: debian-buster-amd
hypervisor: vagrant
box: bento/debian-10
vagrant_memsize: 1024
CONFIG:
type: aio
12 changes: 12 additions & 0 deletions spec/acceptance/nodesets/debian-stretch-amd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
HOSTS:
i2debian9:
roles:
- agent
- default
platform: debian-stretch-amd
hypervisor: vagrant
box: bento/debian-9
vagrant_memsize: 1024
CONFIG:
type: aio
9 changes: 9 additions & 0 deletions spec/classes/idomysql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@
it { is_expected.to contain_package('icinga2-ido-mysql').with({ 'ensure' => 'installed' }) }
end

if facts[:osfamily] == 'Debian'
it { is_expected.to contain_file('/etc/dbconfig-common/icinga2-ido-mysql.conf')
.with({
'ensure' => 'file',
'owner' => 'root',
'group' => 'root', })
}
end

it { is_expected.to contain_icinga2__feature('ido-mysql').with({'ensure' => 'present'}) }

it { is_expected.to contain_icinga2__object('icinga2::object::IdoMysqlConnection::ido-mysql')
Expand Down
9 changes: 9 additions & 0 deletions spec/classes/idopgsql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
it { is_expected.to contain_package('icinga2-ido-pgsql').with({ 'ensure' => 'installed' }) }
end

if facts[:osfamily] == 'Debian'
it { is_expected.to contain_file('/etc/dbconfig-common/icinga2-ido-pgsql.conf')
.with({
'ensure' => 'file',
'owner' => 'root',
'group' => 'root', })
}
end

it { is_expected.to contain_icinga2__feature('ido-pgsql').with({'ensure' => 'present'}) }

it { is_expected.to contain_concat__fragment('icinga2::object::IdoPgsqlConnection::ido-pgsql')
Expand Down

0 comments on commit 07c94f3

Please sign in to comment.