foreman_default_hostgroup 2.0.0 → 2.0.1

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjlmNWYzMGJjMGZiMTNiNWYwNTU4YTJiNThlYjk5MjZhZjBhYzM0Yw==
4
+ MDQ3MDU3NTRiNDNkNmExNzcxNmJlZDBmMDM3N2NkOWJhZGQxNTExZg==
5
5
  data.tar.gz: !binary |-
6
- Yjg1MjJhMTFlYzY0YjQ4YWM2MTdlY2E3YjY4YmFkYmM3Njc0ZjZmMw==
6
+ OWNkODUwM2VmYTk4YWFhYzQ2MDViZWRlZTQyZTNlMWE1ZTA5MDFlNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTMzNGEzNDA3OGM1YTEwZGQ4MmRhMWI0MjZlYzgwNzZiYmE0MGE2NDZjYjMz
10
- NGU5OGI0ZGQ4YTMyMWE1NzcxOTY0OWQ5ODlmYmQ4ODU4YjA0NWM0MzhhZTkz
11
- NDczODMwNDRiNTNjN2FhYjgxODdhMzM5YjFlM2IwZTk5YTU0MzM=
9
+ NGIyZWZmN2NmNTZkMDNjZWJhMjViMTk4NWU1MWU3ODUxMzczZmVlODgzNTg1
10
+ MmExYjU2MzAxMWIwNjViY2MyNGQ3MzVjMWVjNmY3YjQzOTM4MGUwOGViMzk3
11
+ NjVjZDk2NDQ0MThhZmRiODc4YjQ5NzJiY2EwYWI2ZjJhZTg3Y2I=
12
12
  data.tar.gz: !binary |-
13
- NjliZmFjMTEyZWUzYTQ0MWJlZmI5Y2IxYTA5MDU3N2FiNGE2YWE3NmY3MDk1
14
- YjVmYzQyMjUyMzMyOGZlMDlmNThjMjI0NWZjZDNkMWEwNjk5MjBiYmNiYzkw
15
- NWVlNWUwMWJhYTkyZGRlMjdiODdmODg3YzhhNGM5NDVmOWI3Y2I=
13
+ ZTFkMzZlZTgyMjBkYTJkYmI2Nzk2OTQ4YTlkN2UxMzg4ZjdhZDk3YjZiMmJh
14
+ OTQ5MTZkYjIwNjIxZGRkZDNiYWUzZjkwY2YxNWE1ZGRhYzIwZjc4ZmIxNzBk
15
+ ZjBjMzE3ZDRjYzUxMzVkOGFhNGI4NDVmN2QyYjQzOTBkOGE5Y2M=
data/README.md CHANGED
@@ -15,7 +15,7 @@ for how to install Foreman plugins
15
15
  | <= 1.2 | 0.1.0 |
16
16
  | 1.3 | 1.0.1 |
17
17
  | 1.4 | 1.1.0 |
18
- | >= 1.5 | 2.0.0 |
18
+ | >= 1.5 | 2.0.1 |
19
19
 
20
20
  ## Usage
21
21
 
@@ -10,11 +10,14 @@ module DefaultHostgroupManagedHostPatch
10
10
 
11
11
  module ClassMethods
12
12
  def import_host_and_facts_with_match_hostgroup hostname, facts, certname = nil, proxy_id = nil
13
- raise Foreman::Exception.new "Could not load default_hostgroup settings, check config" unless SETTINGS[:default_hostgroup]
14
- raise Foreman::Exception.new "Could not load default_hostgroup map from settings, check config." unless SETTINGS[:default_hostgroup][:map]
13
+ host, result = import_host_and_facts_without_match_hostgroup(hostname, facts, certname, proxy_id)
14
+
15
+ unless SETTINGS[:default_hostgroup] && SETTINGS[:default_hostgroup][:map]
16
+ Rails.logger.warn "DefaultHostgroupMatch: Could not load default_hostgroup map from settings, check config."
17
+ return host, result
18
+ end
15
19
 
16
20
  Rails.logger.debug "DefaultHostgroupMatch: performing Hostgroup match"
17
- host, result = import_host_and_facts_without_match_hostgroup(hostname, facts, certname, proxy_id)
18
21
 
19
22
  if Setting[:force_hostgroup_match_only_new]
20
23
  # host.new_record? will only test for the early return in the core method, a real host
@@ -1,3 +1,3 @@
1
1
  module ForemanDefaultHostgroup
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_default_hostgroup
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Sutcliffe