Skip to content

Commit 13a4eb5

Browse files
authored
Merge pull request #680 from voxpupuli/modulesync
modulesync 2.12.0 / zabbix::web: Allow httpd to speak to the database
2 parents 8f411bf + ef95926 commit 13a4eb5

File tree

5 files changed

+24
-46
lines changed

5 files changed

+24
-46
lines changed

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,35 @@ matrix:
2424
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
2525
- rvm: 2.5.3
2626
bundler_args: --without development release
27-
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64{image=ubuntu:xenial-20191212} BEAKER_HYPERVISOR=docker CHECK=beaker
27+
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=ubuntu1604-64{image=ubuntu:xenial-20191212} CHECK=beaker
2828
services: docker
2929
- rvm: 2.5.3
3030
bundler_args: --without development release
31-
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64{image=ubuntu:xenial-20191212} BEAKER_HYPERVISOR=docker CHECK=beaker
31+
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1604-64{image=ubuntu:xenial-20191212} CHECK=beaker
3232
services: docker
3333
- rvm: 2.5.3
3434
bundler_args: --without development release
35-
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{image=centos:7.6.1810} BEAKER_HYPERVISOR=docker CHECK=beaker
35+
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=centos7-64{image=centos:7.6.1810} CHECK=beaker
3636
services: docker
3737
- rvm: 2.5.3
3838
bundler_args: --without development release
39-
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64{image=centos:7.6.1810} BEAKER_HYPERVISOR=docker CHECK=beaker
39+
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=centos7-64{image=centos:7.6.1810} CHECK=beaker
4040
services: docker
4141
- rvm: 2.5.3
4242
bundler_args: --without development release
43-
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
43+
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=debian9-64 CHECK=beaker
4444
services: docker
4545
- rvm: 2.5.3
4646
bundler_args: --without development release
47-
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
47+
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=debian9-64 CHECK=beaker
4848
services: docker
4949
- rvm: 2.5.3
5050
bundler_args: --without development release
51-
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian10-64 BEAKER_HYPERVISOR=docker CHECK=beaker
51+
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=debian10-64 CHECK=beaker
5252
services: docker
5353
- rvm: 2.5.3
5454
bundler_args: --without development release
55-
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64 BEAKER_HYPERVISOR=docker CHECK=beaker
55+
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=debian10-64 CHECK=beaker
5656
services: docker
5757
branches:
5858
only:

Gemfile

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ group :test do
1717
gem 'fakefs', '0.13.3', :require => false if RUBY_VERSION < '2.3.0'
1818
gem 'fakefs', :require => false if RUBY_VERSION >= '2.3.0'
1919
gem 'zabbixapi', :require => false
20-
gem 'rspec-puppet-facts', :require => false, :git => 'https://github.com/ekohl/rspec-puppet-facts', :ref => '7674437d8d48af3a910ac3858c9eb63853dc1821'
20+
gem 'rspec-puppet-facts', :require => false, :git => 'https://github.com/mcanevet/rspec-puppet-facts', :ref => '9541292d4fc35db3be1badace673c1108154b571'
2121
end
2222

2323
group :development do
@@ -28,27 +28,7 @@ group :development do
2828
end
2929

3030
group :system_tests do
31-
gem 'winrm', :require => false
32-
if beaker_version = ENV['BEAKER_VERSION']
33-
gem 'beaker', *location_for(beaker_version)
34-
else
35-
gem 'beaker', '>= 4.2.0', :require => false
36-
end
37-
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
38-
gem 'beaker-rspec', *location_for(beaker_rspec_version)
39-
else
40-
gem 'beaker-rspec', :require => false
41-
end
42-
gem 'serverspec', :require => false
43-
gem 'beaker-hostgenerator', '>= 1.1.22', :require => false
44-
gem 'beaker-docker', :require => false
45-
gem 'beaker-puppet', :require => false
46-
gem 'beaker-puppet_install_helper', :require => false
47-
gem 'beaker-module_install_helper', :require => false
48-
gem 'rbnacl', '>= 4', :require => false
49-
gem 'rbnacl-libsodium', :require => false
50-
gem 'bcrypt_pbkdf', :require => false
51-
gem 'ed25519', :require => false
31+
gem 'voxpupuli-acceptance', :require => false
5232
end
5333

5434
group :release do

manifests/web.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,15 @@
468468

469469
# check if selinux is active and allow zabbix
470470
if fact('os.selinux.enabled') == true and $manage_selinux {
471+
# allow httpd to speak to the zabbix service
471472
selboolean{'httpd_can_connect_zabbix':
472473
persistent => true,
473474
value => 'on',
474475
}
476+
# allow httpd to speak to the database
477+
selboolean{'httpd_can_network_connect_db':
478+
persistent => true,
479+
value => 'on',
480+
}
475481
}
476482
}

spec/acceptance/agent_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class { 'zabbix::agent':
1717
}
1818
EOS
1919

20+
cleanup_zabbix
21+
2022
# Run it twice and test for idempotency
2123
apply_manifest(pp, catch_failures: true)
2224
apply_manifest(pp, catch_changes: true)

spec/spec_helper_acceptance.rb

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
1-
require 'beaker-rspec'
2-
require 'beaker-puppet'
3-
require 'beaker/puppet_install_helper'
4-
require 'beaker/module_install_helper'
1+
require 'voxpupuli/acceptance/spec_helper_acceptance'
52

6-
run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no'
7-
install_ca_certs unless ENV['PUPPET_INSTALL_TYPE'] =~ %r{pe}i
8-
install_module_on(hosts)
9-
install_module_dependencies_on(hosts)
10-
11-
RSpec.configure do |c|
12-
# Readable test descriptions
13-
c.formatter = :documentation
14-
hosts.each do |host|
15-
if host[:platform] =~ %r{el-7-x86_64} && host[:hypervisor] =~ %r{docker}
16-
on(host, "sed -i '/nodocs/d' /etc/yum.conf")
17-
end
3+
configure_beaker do |host|
4+
# The CentOS docker image has a yum config that won't install docs, to keep used space low
5+
# zabbix packages their SQL file as doc, we need that for bootstrapping the database
6+
if host[:platform] =~ %r{el-7-x86_64} && host[:hypervisor] =~ %r{docker}
7+
on(host, "sed -i '/nodocs/d' /etc/yum.conf")
188
end
199
end
2010

0 commit comments

Comments
 (0)