itamae-plugin-recipe-zabbix 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1a7c0d55d631fd50fcda699b4f50387a0c4d325
4
- data.tar.gz: f591585e2ec20815bcabf76a49b4d22320e0e34c
3
+ metadata.gz: c9ed3f1ca97ba53d81c2c8b533d3a6fd288a6720
4
+ data.tar.gz: 83fecbb0cd48d22a8a2d926fac27b2cc7652b7f1
5
5
  SHA512:
6
- metadata.gz: 2e88203ebe8af86ee67a222e5731be4f29574babb41475d1e622995286f9c22068dc3d6a813be60ea48bd1de43f7d33976b2c942a33992925ecc6da72090c656
7
- data.tar.gz: 7e126f625b6b2ab89e4133cd19373cd1de4e23598a3a798515364f38bc91a294e4be3941cbbaa7a611a252ab26dfafd70c30c898f7a22fe8e568c31f684f3504
6
+ metadata.gz: 1f033ac472b393e9bceefd8c751821f8fc56033256609fb49f101b12e803829222ca0332f4b07083b07cba5ebe53308749996da92648a51811f41db64f392efe
7
+ data.tar.gz: 8597d025f02f4121d1825a2d05726426dcccf5b96dd609123aac163ff88027548a4720ec59ac371b61553cae5879f56bc4f31f092d0102faf6f838781593fe42
data/README.md CHANGED
@@ -41,6 +41,7 @@ zabbix:
41
41
 
42
42
  ```ruby
43
43
  include_recipe "zabbix"
44
+ include_recipe "zabbix::agent"
44
45
 
45
46
  zabbix_userparameters "all" do
46
47
  path File.expand_path(File.dirname(__FILE__)) + "/zabbix/templates/etc/zabbix/zabbix_agentd.d/"
@@ -12,6 +12,18 @@ platform_version = node[:zabbix][:platform_version] if node[:zabbix][:platform_v
12
12
  cpu = "x86_64" # or i386
13
13
  cpu = node[:zabbix][:platform_cpu] if node[:zabbix][:platform_cpu]
14
14
 
15
- package "http://repo.zabbix.com/zabbix/#{zabbix_version}/#{platform}/#{platform_version}/#{cpu}/zabbix-release-#{zabbix_version}-1.el#{platform_version}.noarch.rpm" do
16
- not_if "rpm -q zabbix-release"
15
+ case node[:platform]
16
+ when "ubuntu"
17
+ codename = 'trusty'
18
+ codename = node[:zabbix][:codename] if node[:zabbix][:codename]
19
+ execute "add zabbix agent pkg" do
20
+ user "root"
21
+ command "wget http://repo.zabbix.com/zabbix/#{zabbix_version}/ubuntu/pool/main/z/zabbix-release/zabbix-release_#{zabbix_version}-1+#{codename}_all.deb"
22
+ command "dpkg -i zabbix-release_#{zabbix_version}-1+#{codename}_all.deb"
23
+ command "apt-get update"
24
+ end
25
+ else
26
+ package "http://repo.zabbix.com/zabbix/#{zabbix_version}/#{platform}/#{platform_version}/#{cpu}/zabbix-release-#{zabbix_version}-1.el#{platform_version}.noarch.rpm" do
27
+ not_if "rpm -q zabbix-release"
28
+ end
17
29
  end
@@ -1,5 +1,9 @@
1
1
  PidFile=/var/run/zabbix/zabbix_agentd.pid
2
+ <% if node[:platform] == 'ubuntu' %>
3
+ LogFile=/var/log/zabbix-agent/zabbix_agentd.log
4
+ <% else %>
2
5
  LogFile=/var/log/zabbix/zabbix_agentd.log
6
+ <% end %>
3
7
  LogFileSize=0
4
8
  EnableRemoteCommands=1
5
9
 
@@ -15,4 +19,8 @@ HostMetadata=<%= node[:zabbix][:host_metadata] %>
15
19
  <% end %>
16
20
 
17
21
  AllowRoot=1
22
+ <% if node[:platform] == 'ubuntu' %>
23
+ Include=/etc/zabbix/zabbix_agentd.conf.d/
24
+ <% else %>
18
25
  Include=/etc/zabbix/zabbix_agentd.d/
26
+ <% end %>
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Zabbix
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-recipe-zabbix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zaru
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-06 00:00:00.000000000 Z
11
+ date: 2016-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler