puppetdb_foreman 6.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2210ab6f4ef16d2fec53bd410bb59ce67e1f1c644f05727df71bcc4882ed2d73
|
4
|
+
data.tar.gz: 4c9238693d329f35d307a42cdef7e1a4c3ebb53e0ee13ffc899b528694e64628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 073a58bb177e3af928a0f65a62976736ffe2326012fe5cefe22b672866315e2e28d2e0d9cbdc7f1cbc28c2483d07039cb9f183a019db12f594e8e6dcda1976f3
|
7
|
+
data.tar.gz: f1a7f4fee3f27b8e652495c0d017356ddfa83c2f4b719096b6e9c4fd98a6be57e16554941d3c5d8776fdcf4f088f0b7770d365ba5e78b5241c5c95e7be8a564b
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ It does the following:
|
|
11
11
|
* Compares nodes in PuppetDB to Hosts in Foreman.
|
12
12
|
* Creates Hosts in Foreman from PuppetDB facts.
|
13
13
|
|
14
|
-
Feel free to raise issues, ask for features, anything, in the github repository or
|
14
|
+
Feel free to raise issues, ask for features, anything, in the github repository or visit [the Foreman support pages](https://theforeman.org/support.html).
|
15
15
|
|
16
16
|
## Compatibility
|
17
17
|
|
@@ -20,11 +20,12 @@ module Orchestration
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def del_puppetdb
|
23
|
-
Rails.logger.info "Deactivating node in PuppetDB: #{name}"
|
24
|
-
::Puppetdb.client.deactivate_node(
|
23
|
+
Rails.logger.info "Deactivating node in PuppetDB: #{certname} (#{name})"
|
24
|
+
::Puppetdb.client.deactivate_node(certname)
|
25
25
|
rescue StandardError => e
|
26
26
|
failure format(
|
27
|
-
_("Failed to deactivate node %<name>
|
27
|
+
_("Failed to deactivate node %<certname> (%<name>) in PuppetDB: %<message>\n "),
|
28
|
+
name: name, message: e.message, certname: certname
|
28
29
|
), e
|
29
30
|
end
|
30
31
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class FixPuppetdbSettingsCategoryToDsl < ActiveRecord::Migration[6.0]
|
4
|
+
def up
|
5
|
+
# rubocop:disable Rails/SkipsModelValidations
|
6
|
+
Setting.where(category: 'Setting::Puppetdb').update_all(category: 'Setting')
|
7
|
+
# rubocop:enable Rails/SkipsModelValidations
|
8
|
+
end
|
9
|
+
end
|
data/test/models/host_test.rb
CHANGED
@@ -26,7 +26,7 @@ class HostTest < ActiveSupport::TestCase
|
|
26
26
|
end
|
27
27
|
|
28
28
|
test '#del_puppetdb' do
|
29
|
-
::PuppetdbClient::V4.any_instance.expects(:deactivate_node).with(host.
|
29
|
+
::PuppetdbClient::V4.any_instance.expects(:deactivate_node).with(host.certname).returns(true)
|
30
30
|
host.send(:del_puppetdb)
|
31
31
|
end
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetdb_foreman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Lobato Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description:
|
69
|
+
description: Disable hosts on PuppetDB after they are deleted or built in Foreman.
|
70
70
|
Follow https://github.com/theforeman/puppetdb_foreman and raise an issue/submit
|
71
|
-
a pull request if you need extra functionality. You can also find some help
|
72
|
-
|
71
|
+
a pull request if you need extra functionality. You can also find some help via
|
72
|
+
the Foreman support pages (https://theforeman.org/support.html).
|
73
73
|
email: elobatocs@gmail.com
|
74
74
|
executables: []
|
75
75
|
extensions: []
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- config/routes.rb
|
96
96
|
- db/migrate/20170717140010_migrate_puppetdb_api_version_setting.rb
|
97
97
|
- db/migrate/20181001113836_remove_puppetdb_dashboard_address_setting.puppetdb_foreman.rb
|
98
|
+
- db/migrate/20221026123754_fix_puppetdb_settings_category_to_dsl.rb
|
98
99
|
- lib/puppetdb_foreman.rb
|
99
100
|
- lib/puppetdb_foreman/engine.rb
|
100
101
|
- lib/puppetdb_foreman/version.rb
|