zinv 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 +4 -4
- data/exe/zinv.rb +10 -15
- data/lib/zinv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fccb8146aff7f71ba9716ae739bccc1e6da0b127
|
4
|
+
data.tar.gz: e9553aa2475b87d49025671e4b0338ee25f260c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f96a066492fd5aeb6ee90c9b4c03960a2b7a88024c393e11e668480a6fd589b7ce346734711baaa8a2a5201eb81fec66a4c4bd2e5010757c3dc090ac1cc8d0d
|
7
|
+
data.tar.gz: e9de78a7bbb5981f24da28c36e54f22420d155b64c884a952ed1a9f32c016ce51d13a990f11e0176c024cbe19085302232951b55e144bb2d409c735c52f7cccf
|
data/exe/zinv.rb
CHANGED
@@ -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]
|
data/lib/zinv/version.rb
CHANGED
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.
|
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
|
+
date: 2017-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|