foreman_ansible 2.2.6 → 2.2.7
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b0cd4bd58b8e727da0bd49c2a4a2aca162ba6124
|
4
|
+
data.tar.gz: 93ea80ff3e3a63e6262cf04d5c3c5b6fb2b502b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0931b7ef4cc32e27de919675706c88a3cb1c47b0b27b7807a74a25ecd42448ce3959c13b51bfa48686bd92728ff1cf4ff858bb1e1837e5184a3312340f33dbc9'
|
7
|
+
data.tar.gz: 2ab415d517f3c0f10f9916f24952925e5c66a5561546325fb9e8ac334afea9f8db1e05c642b0f1c96cc6891787df04378f184404199283786b2363ecbceab6b9
|
@@ -25,7 +25,7 @@ class AnsibleRolesController < ::ApplicationController
|
|
25
25
|
def import
|
26
26
|
changed = @importer.import!
|
27
27
|
if changed.values.all?(&:empty?)
|
28
|
-
|
28
|
+
notice no_changed_roles_message
|
29
29
|
redirect_to ansible_roles_path
|
30
30
|
else
|
31
31
|
render :locals => { :changed => changed }
|
@@ -33,8 +33,8 @@ class AnsibleRolesController < ::ApplicationController
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def confirm_import
|
36
|
-
@importer.finish_import(params[:changed]
|
37
|
-
|
36
|
+
@importer.finish_import(params[:changed])
|
37
|
+
notice _('Import of roles successfully finished.')
|
38
38
|
redirect_to ansible_roles_path
|
39
39
|
end
|
40
40
|
|
@@ -4,17 +4,22 @@ module ForemanAnsible
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
def insights_remediation(plan_id, organization_id = Organization.current.id)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
7
|
+
return "$INSIGHTS_REMEDIATION[#{plan_id}, #{organization_id}]" if preview?
|
8
|
+
|
9
|
+
cached("insights_#{plan_id}_#{organization_id}") do
|
10
|
+
Rails.logger.debug 'cache miss for insights plan fetching'
|
11
|
+
insights_plan = ForemanAnsible::InsightsPlanRunner.new(
|
12
|
+
Organization.find(organization_id),
|
13
|
+
plan_id
|
14
|
+
)
|
15
|
+
rules = insights_plan.playbook
|
16
|
+
disclaimer = insights_plan.parse_disclaimer
|
17
|
+
hostname_rules_relation = insights_plan.hostname_rules(rules)
|
18
|
+
global_rules = insights_plan.rules_to_hash(rules)
|
19
|
+
host_playbooks = individual_host_playbooks(hostname_rules_relation,
|
20
|
+
global_rules)
|
21
|
+
"#{disclaimer}\n#{host_playbooks.to_yaml}"
|
22
|
+
end
|
18
23
|
end
|
19
24
|
|
20
25
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_ansible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.7
|
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: 2018-
|
11
|
+
date: 2018-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -72,7 +72,7 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 1.5.6
|
76
76
|
- - "<"
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '2.0'
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.
|
85
|
+
version: 1.5.6
|
86
86
|
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '2.0'
|
@@ -265,43 +265,43 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
265
265
|
version: '0'
|
266
266
|
requirements: []
|
267
267
|
rubyforge_project:
|
268
|
-
rubygems_version: 2.
|
268
|
+
rubygems_version: 2.6.8
|
269
269
|
signing_key:
|
270
270
|
specification_version: 4
|
271
271
|
summary: Ansible integration with Foreman (theforeman.org)
|
272
272
|
test_files:
|
273
|
-
- test/
|
274
|
-
- test/
|
275
|
-
- test/
|
273
|
+
- test/unit/host_ansible_role_test.rb
|
274
|
+
- test/unit/helpers/ansible_reports_helper_test.rb
|
275
|
+
- test/unit/ansible_role_test.rb
|
276
276
|
- test/unit/concerns/config_reports_extensions_test.rb
|
277
|
-
- test/unit/concerns/hostgroup_extensions_test.rb
|
278
277
|
- test/unit/concerns/host_managed_extensions_test.rb
|
279
|
-
- test/unit/
|
280
|
-
- test/unit/services/inventory_creator_test.rb
|
281
|
-
- test/unit/services/api_roles_importer_test.rb
|
282
|
-
- test/unit/services/fact_parser_test.rb
|
283
|
-
- test/unit/services/roles_importer_test.rb
|
284
|
-
- test/unit/services/fact_sparser_test.rb
|
285
|
-
- test/unit/services/structured_fact_importer_test.rb
|
286
|
-
- test/unit/services/ui_roles_importer_test.rb
|
287
|
-
- test/unit/services/insights_plan_runner_test.rb
|
288
|
-
- test/unit/services/fact_importer_test.rb
|
289
|
-
- test/unit/lib/proxy_api/ansible_test.rb
|
278
|
+
- test/unit/concerns/hostgroup_extensions_test.rb
|
290
279
|
- test/unit/lib/foreman_ansible_core/command_creator_test.rb
|
291
280
|
- test/unit/lib/foreman_ansible_core/roles_reader_test.rb
|
292
281
|
- test/unit/lib/foreman_ansible_core/playbook_runner_test.rb
|
293
|
-
- test/unit/
|
282
|
+
- test/unit/lib/proxy_api/ansible_test.rb
|
283
|
+
- test/unit/ansible_provider_test.rb
|
294
284
|
- test/unit/hostgroup_ansible_role_test.rb
|
285
|
+
- test/unit/services/fact_importer_test.rb
|
286
|
+
- test/unit/services/ui_roles_importer_test.rb
|
287
|
+
- test/unit/services/inventory_creator_test.rb
|
288
|
+
- test/unit/services/roles_importer_test.rb
|
289
|
+
- test/unit/services/insights_plan_runner_test.rb
|
290
|
+
- test/unit/services/fact_parser_test.rb
|
291
|
+
- test/unit/services/api_roles_importer_test.rb
|
292
|
+
- test/unit/services/structured_fact_importer_test.rb
|
293
|
+
- test/unit/services/fact_sparser_test.rb
|
294
|
+
- test/unit/services/ansible_report_importer_test.rb
|
295
295
|
- test/unit/actions/run_proxy_ansible_command_test.rb
|
296
296
|
- test/unit/actions/run_ansible_job_test.rb
|
297
|
-
- test/
|
298
|
-
- test/
|
299
|
-
- test/
|
297
|
+
- test/test_plugin_helper.rb
|
298
|
+
- test/functional/hosts_controller_test.rb
|
299
|
+
- test/functional/api/v2/hosts_controller_test.rb
|
300
300
|
- test/functional/api/v2/ansible_roles_controller_test.rb
|
301
301
|
- test/functional/api/v2/hostgroups_controller_test.rb
|
302
|
-
- test/functional/api/v2/hosts_controller_test.rb
|
303
302
|
- test/functional/ansible_roles_controller_test.rb
|
304
|
-
- test/functional/hosts_controller_test.rb
|
305
303
|
- test/factories/ansible_roles.rb
|
306
304
|
- test/factories/ansible_proxy.rb
|
307
|
-
- test/
|
305
|
+
- test/fixtures/report.json
|
306
|
+
- test/fixtures/sample_facts.json
|
307
|
+
- test/fixtures/insights_playbook.yaml
|