chef_handler_foreman 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef_handler_foreman/foreman_facts.rb +12 -3
- data/lib/chef_handler_foreman/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: 5b83750e2b938a42c0814f5c215e604eb2eb6652
|
4
|
+
data.tar.gz: 208020cc87c76471844899ba45eb6122bbe6868c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ca9c9999d841ab572885c7cb8ec776a73f4d257453dc431dd5eb50da8f9ffb98f667641728b7e3b7b5336e184807b8615798600d40cf59f3aa94ffe970506e8
|
7
|
+
data.tar.gz: 9307742f17cc892ecb02658f135b091818ab9227ae6bedb1cba28d08f7e355cab7f5dfb7587d274a47d43fa180a67ca74787cd8dd997fbf664b15b258fd877b3
|
@@ -30,8 +30,15 @@ module ChefHandlerForeman
|
|
30
30
|
private
|
31
31
|
|
32
32
|
def prepare_facts
|
33
|
-
|
34
|
-
|
33
|
+
return false if node.nil?
|
34
|
+
|
35
|
+
os, release = nil
|
36
|
+
if node.respond_to?(:lsb)
|
37
|
+
os = node.lsb[:id]
|
38
|
+
release = node.lsb[:release]
|
39
|
+
end
|
40
|
+
os ||= node.platform
|
41
|
+
release ||= node.platform_version
|
35
42
|
|
36
43
|
# operatingsystem and operatingsystemrelase are not needed since foreman_chef 0.1.3
|
37
44
|
{ :name => node.name,
|
@@ -98,7 +105,9 @@ module ChefHandlerForeman
|
|
98
105
|
|
99
106
|
def send_attributes(attributes)
|
100
107
|
if @cache_file and !@cache_expired
|
101
|
-
Chef::Log.info "No attributes have changed - not uploading to foreman"
|
108
|
+
Chef::Log.info "No attributes have changed - not uploading to foreman"
|
109
|
+
elsif !attributes
|
110
|
+
Chef::Log.info "No attributes received, failed run - not uploading to foreman"
|
102
111
|
else
|
103
112
|
if uploader
|
104
113
|
Chef::Log.info 'Sending attributes to foreman'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef_handler_foreman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Hulan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|