Skip to content

Commit

Permalink
testing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TD-4242 committed Apr 25, 2017
1 parent 8d9e36e commit db6bd2e
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Install Method options are:

Version

node['zabbix']['agent']['version'] # Default 2.4.4
node['zabbix']['agent']['version'] # Default 3.0.9

Servers

Expand All @@ -116,7 +116,7 @@ Servers
node['zabbix']['agent']['conf']['ServerActive'] = ["Your_zabbix_active_server.com"]

#### Package install
If you do not set any attributes you will get an install of zabbix agent version 2.4.4 with
If you do not set any attributes you will get an install of zabbix agent version 3.0.9 with
what should be a working configuration if your DNS has aliases for zabbix.yourdomain.com and
your hosts search yourdomain.com.

Expand Down Expand Up @@ -209,6 +209,11 @@ To run the tests, insure you meet the below dependancies, then just run rake in
* Add cookbook_file install method

# CHANGELOG
### 0.14.0
* upgrade to default client version 3.0.9
* move kitchen to docker so it can be run in travisci

### 0.13.0
### 0.12.0
* include kitchen tests for all supported OS types
* upgrade to default client version 2.4.4
Expand Down
10 changes: 5 additions & 5 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
default['zabbix']['agent']['include_dir'] = ::File.join(node['zabbix']['etc_dir'], 'zabbix_agentd.d')
default['zabbix']['agent']['config_file'] = ::File.join(node['zabbix']['etc_dir'], 'zabbix_agentd.conf')
default['zabbix']['agent']['userparams_config_file'] = ::File.join(node['zabbix']['agent']['include_dir'], 'user_params.conf')
default['zabbix']['agent']['pid_file'] = '/var/run/zabbix/zabbix.pid'
default['zabbix']['agent']['pid_file'] = '/var/run/zabbix/zabbix_agentd.pid'

if node['platform'] == 'windows'
default['zabbix']['install_dir'] = node['zabbix']['etc_dir']
Expand Down Expand Up @@ -110,17 +110,17 @@
# package install
case node['platform']
when 'ubuntu', 'debian'
default['zabbix']['agent']['package']['repo_uri'] = "http://repo.zabbix.com/zabbix/2.4/#{node['platform']}/"
default['zabbix']['agent']['package']['repo_uri'] = "http://repo.zabbix.com/zabbix/3.0/#{node['platform']}/"
default['zabbix']['agent']['package']['repo_key'] = 'http://repo.zabbix.com/zabbix-official-repo.key'
when 'redhat', 'centos', 'scientific', 'oracle'
default['zabbix']['agent']['package']['repo_uri'] = 'http://repo.zabbix.com/zabbix/2.4/rhel/$releasever/$basearch/'
default['zabbix']['agent']['package']['repo_uri'] = 'http://repo.zabbix.com/zabbix/3.0/rhel/$releasever/$basearch/'
default['zabbix']['agent']['package']['repo_key'] = 'http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX'
when 'amazon'
# current Amazon AMI based on RHEL6 at the moment
default['zabbix']['agent']['package']['repo_uri'] = 'http://repo.zabbix.com/zabbix/2.4/rhel/6/$basearch/'
default['zabbix']['agent']['package']['repo_uri'] = 'http://repo.zabbix.com/zabbix/3.0/rhel/6/$basearch/'
default['zabbix']['agent']['package']['repo_key'] = 'http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX'
when 'fedora'
default['zabbix']['agent']['package']['repo_uri'] = 'http://repo.zabbix.com/zabbix/2.4/rhel/7/$basearch/'
default['zabbix']['agent']['package']['repo_uri'] = 'http://repo.zabbix.com/zabbix/3.0/rhel/7/$basearch/'
default['zabbix']['agent']['package']['repo_key'] = 'http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX'
end

Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
depends 'yum' # For Redhat family OSs
depends 'build-essential' # for source build/install
depends 'chocolatey' # For Windows family OSs
recommends 'libzabbix' # LWRPs to connect to zabbix server
# recommends 'libzabbix' # LWRPs to connect to zabbix server
6 changes: 3 additions & 3 deletions spec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

it 'adds the apt repository for zabbix' do
expect(chef_run).to add_apt_repository('zabbix').with(
uri: 'http://repo.zabbix.com/zabbix/2.4/ubuntu/',
uri: 'http://repo.zabbix.com/zabbix/3.0/ubuntu/',
components: ['main'],
key: 'http://repo.zabbix.com/zabbix-official-repo.key'
)
Expand All @@ -142,7 +142,7 @@
expect(chef_run).to create_yum_repository('zabbix').with(
repositoryid: 'zabbix',
description: 'Zabbix Official Repository',
baseurl: 'http://repo.zabbix.com/zabbix/2.4/rhel/$releasever/$basearch/',
baseurl: 'http://repo.zabbix.com/zabbix/3.0/rhel/$releasever/$basearch/',
gpgkey: 'http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX',
sslverify: false
)
Expand All @@ -152,7 +152,7 @@
expect(chef_run).to create_yum_repository('zabbix-non-supported').with(
repositoryid: 'zabbix-non-supported',
description: 'Zabbix Official Repository non-supported - $basearch',
baseurl: 'http://repo.zabbix.com/zabbix/2.4/rhel/$releasever/$basearch/',
baseurl: 'http://repo.zabbix.com/zabbix/3.0/rhel/$releasever/$basearch/',
gpgkey: 'http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX',
sslverify: false
)
Expand Down
5 changes: 2 additions & 3 deletions spec/rendered_templates/zabbix-agent
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/zabbix/sbin:/opt/zabbix/bin
DAEMON=/opt/zabbix/sbin/${NAME}
DESC="Zabbix agent daemon"
DIR=/var/run/zabbix
PID=/var/run/zabbix/zabbix.pid
PID=/var/run/zabbix/zabbix_agentd.pid
USER=zabbix
GROUP=zabbix

Expand All @@ -45,8 +45,7 @@ case "$1" in

stop)
echo "Stopping $DESC: $NAME"
start-stop-daemon --oknodo --stop --pidfile $PID \
--exec $DAEMON
start-stop-daemon --oknodo --stop --pidfile $PID
;;
restart|force-reload)
#
Expand Down
2 changes: 1 addition & 1 deletion spec/rendered_templates/zabbix-agent-rh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/zabbix/sbin:/opt/zabbix/bin
DAEMON=/opt/zabbix/sbin/${NAME}
DESC="Zabbix agent daemon"
DIR=/var/run/zabbix
PID=/var/run/zabbix/zabbix.pid
PID=/var/run/zabbix/zabbix_agentd.pid
LOCK=/var/lock/subsys/$NAME
USER=zabbix
GROUP=zabbix
Expand Down
3 changes: 1 addition & 2 deletions templates/default/zabbix-agent.init.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ case "$1" in

stop)
echo "Stopping $DESC: $NAME"
start-stop-daemon --oknodo --stop --pidfile $PID \
--exec $DAEMON
start-stop-daemon --oknodo --stop --pidfile $PID
;;
restart|force-reload)
#
Expand Down

0 comments on commit db6bd2e

Please sign in to comment.