awsbix 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9329db0807749656a85796aa07a9892348d77f04
4
- data.tar.gz: 6a66f81a1c030c9655552671e9727e050fbed1d3
3
+ metadata.gz: dc1caca23d77bdc4951be5218e77a717c76bfe55
4
+ data.tar.gz: ea5acdf3444d5145c2cf648f43bf93fbbed3f24c
5
5
  SHA512:
6
- metadata.gz: 07c7a612078e52b396bcabd44417fdbc69f71c4356bae12464aab104781d4342ed8bdbe3301ba55175d94572f6dffecf769499fd98cd727205d5acab2e07c162
7
- data.tar.gz: 4f005004cdb1bae93332c620df18cfbc75d2559378c1a85757f06f66c6fb393873cdbedb88f1a60827a0b03b806c548809cbebd3c3ff2d9b37d2d1999a311fb4
6
+ metadata.gz: 1fb9e03b11027680dbdfc3bf2c90146e9b75cf9437bc20aaab6b68752db4ed469ff85fc7f9f65e11eb3028ce08375a1974dc4b36f23dc03aaf52ee2769de0903
7
+ data.tar.gz: f15719e109b373f80783f7c8ccfb236a7eec6c7100b8a7137a0a95b6e4635a2ba923dcf704628299a582f8fd1a6cd6c4a46926d2a17b6a5bd981f46e16cb2da1
@@ -115,10 +115,14 @@ class Awsbix
115
115
  end
116
116
  end
117
117
 
118
+ def zbx_get_all_hosts()
119
+ @zbx_hosts = @zbx.hosts.all
120
+ end
121
+
118
122
  def zbx_enable_host(hostname)
119
123
  # append hostname suffix if one is configured
120
124
  if self.get_conf('aws_dns_suffix') then
121
- self.debug_print("debug: appending #{self.get_conf('aws_dns_suffix')} to #{options[:hostname]}")
125
+ self.debug_print("debug: appending #{self.get_conf('aws_dns_suffix')} to #{hostname}")
122
126
  hostname = hostname + self.get_conf('aws_dns_suffix')
123
127
  end
124
128
 
@@ -131,7 +135,7 @@ class Awsbix
131
135
  def zbx_disable_host(hostname)
132
136
  # append hostname suffix if one is configured
133
137
  if self.get_conf('aws_dns_suffix') then
134
- self.debug_print("debug: appending #{self.get_conf('aws_dns_suffix')} to #{options[:hostname]}")
138
+ self.debug_print("debug: appending #{self.get_conf('aws_dns_suffix')} to #{hostname}")
135
139
  hostname = hostname + self.get_conf('aws_dns_suffix')
136
140
  end
137
141
 
@@ -60,7 +60,7 @@ class Awsbix
60
60
  self.debug_print("info: processing #{region}")
61
61
  AWS.memoize do
62
62
  @ec2.regions[region].instances.each do | inst |
63
- if inst.status.match(/options[:instance_status]/) then
63
+ if inst.status.match(/#{options[:instance_status]}/) then
64
64
  inst.security_groups.each do | sg |
65
65
  if options[:regex].is_a?(Regexp) then
66
66
  case options[:filter]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awsbix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Llewellyn-Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-09 00:00:00.000000000 Z
11
+ date: 2017-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.2'
33
+ version: '2.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.2'
40
+ version: '2.0'
41
41
  description: automates adding/removing hosts to Zabbix
42
42
  email: code@onixconsulting.co.uk
43
43
  executables: