zinv 0.1.1 → 0.1.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/exe/zinv.rb +10 -15
  3. data/lib/zinv/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c535421a13c6d4073b24e1ac9fe232596f4a981
4
- data.tar.gz: 300830bd15285c4bb3c4c87ebb270c340f3c82ea
3
+ metadata.gz: fccb8146aff7f71ba9716ae739bccc1e6da0b127
4
+ data.tar.gz: e9553aa2475b87d49025671e4b0338ee25f260c6
5
5
  SHA512:
6
- metadata.gz: 1c82d0c48a8dc7b6c63f2df23707b8573186cf7521a3282483e355d32bc460a26c74efa6f6d69ddbf679b9b9e9415bc639f88edb1dc7c4cda4f408f419085929
7
- data.tar.gz: f84f6f96870327cad8e21a2b8810d3c2dd8577576f688868599bc2f706318818f07476b71b48356c9ecd311940e9c07268e8046b9c540674e190ee7e39819c3f
6
+ metadata.gz: 4f96a066492fd5aeb6ee90c9b4c03960a2b7a88024c393e11e668480a6fd589b7ce346734711baaa8a2a5201eb81fec66a4c4bd2e5010757c3dc090ac1cc8d0d
7
+ data.tar.gz: e9de78a7bbb5981f24da28c36e54f22420d155b64c884a952ed1a9f32c016ce51d13a990f11e0176c024cbe19085302232951b55e144bb2d409c735c52f7cccf
@@ -7,7 +7,17 @@ require 'set'
7
7
  require 'yaml'
8
8
 
9
9
 
10
+ # Assign a comma separated list of host names to this before running
11
+ # ansible-playbook to have hosts not yet in zabbix listed in inventory
12
+ runtimehostvar = 'ZINV_ADD_HOSTS'
10
13
 
14
+ opts = Trollop::options do
15
+ opt :list, "List entire inventory" # required by ansible
16
+ opt :host, "List a single host", :type => :string # required by ansible
17
+ opt :debug, "Debugging verbosity"
18
+ opt :groups, "Dump groups list"
19
+ opt :templates, "Dump templates list"
20
+ end
11
21
 
12
22
  if not (ENV['ZINV_ZABBIX_URL'] and ENV['ZINV_ZABBIX_USER'] and ENV['ZINV_ZABBIX_PASS'])
13
23
  puts "\nYou *must* define the following environment variables for zinv.rb to work properly:\n\n"
@@ -21,9 +31,6 @@ if not (ENV['ZINV_ZABBIX_URL'] and ENV['ZINV_ZABBIX_USER'] and ENV['ZINV_ZABBIX_
21
31
  exit(1)
22
32
  end
23
33
 
24
-
25
-
26
-
27
34
  # This list forms the basis for the collection of hosts and
28
35
  # templates included in inventory. Any template directly or
29
36
  # indirectly derived from these will be included. Any host
@@ -34,22 +41,10 @@ roottemplatenames = [
34
41
  'Template OS Linux Active',
35
42
  'Template SNMP OS Linux'
36
43
  ]
37
-
38
44
  if ENV['ZINV_ROOT_TEMPLATES']
39
45
  roottemplatenames = ENV['ZINV_ROOT_TEMPLATES'].split(',')
40
46
  end
41
47
 
42
- # Assign a comma separated list of host names to this before running
43
- # ansible-playbook to have hosts not yet in zabbix listed in inventory
44
- runtimehostvar = 'ZINV_ADD_HOSTS'
45
-
46
- opts = Trollop::options do
47
- opt :list, "List entire inventory" # required by ansible
48
- opt :host, "List a single host", :type => :string # required by ansible
49
- opt :debug, "Debugging verbosity"
50
- opt :groups, "Dump groups list"
51
- opt :templates, "Dump templates list"
52
- end
53
48
 
54
49
  # Generate an in-memory host group with the comma delim list in this env var
55
50
  if ENV[runtimehostvar]
@@ -1,3 +1,3 @@
1
1
  module Zinv
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zinv
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
  - Dave Parker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-11 00:00:00.000000000 Z
11
+ date: 2017-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler