Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian10 support #604

Merged
merged 3 commits into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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