foreman_ansible 6.0.0 → 6.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 +4 -4
- data/app/models/foreman_ansible/ansible_provider.rb +0 -8
- data/app/services/foreman_ansible/variables_importer.rb +3 -3
- data/app/views/ansible_roles/welcome.html.erb +1 -1
- data/app/views/foreman_ansible/job_templates/configure_cloud_connector_-_ansible_default.erb +1 -0
- data/app/views/foreman_ansible/job_templates/service_action_-_enable_web_console.erb +16 -0
- data/lib/foreman_ansible/remote_execution.rb +8 -1
- data/lib/foreman_ansible/version.rb +1 -1
- metadata +21 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa5982c235f7ca52e9976e1bf0f67dffb08b844421f11caad977e15afabcba7d
|
4
|
+
data.tar.gz: 1ff9a41c74857925e1fc9c4e01cbf85b799e95bc7b9bccec42d2c4cf25ed1fc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aa852e92c33636b1abc32204f843d21a8c93b735bf364f6bcdd1276356b51a08b21fdfa0b6936ba346dfa8b46146b454da32836de9cb4b4aa7f87d50c99e88c
|
7
|
+
data.tar.gz: 15c54c485deaad7abfc669f89463a2782d5de89e2d175aab4171d59ea91746c1928265c04c8ec64047014b529e2d3ed38f2fe625e6f5a2dc43b5b0db9060edfa
|
@@ -66,14 +66,6 @@ if defined? ForemanRemoteExecution
|
|
66
66
|
'ForemanAnsibleCore::TaskLauncher::Playbook::PlaybookRunnerAction'
|
67
67
|
end
|
68
68
|
|
69
|
-
def required_proxy_selector_for(template)
|
70
|
-
if template.remote_execution_features.where(:label => 'ansible_run_capsule_upgrade').any?
|
71
|
-
::DefaultProxyProxySelector.new
|
72
|
-
else
|
73
|
-
super
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
69
|
private
|
78
70
|
|
79
71
|
def ansible_command?(template)
|
@@ -78,7 +78,7 @@ module ForemanAnsible
|
|
78
78
|
def create_new_variables(variables)
|
79
79
|
iterate_over_variables(variables) do |role, memo, attrs|
|
80
80
|
variable = AnsibleVariable.new(
|
81
|
-
JSON.parse(attrs)
|
81
|
+
JSON.parse(attrs)
|
82
82
|
)
|
83
83
|
variable.ansible_role = ::AnsibleRole.find_by(:name => role)
|
84
84
|
variable.save
|
@@ -88,7 +88,7 @@ module ForemanAnsible
|
|
88
88
|
|
89
89
|
def update_variables(variables)
|
90
90
|
iterate_over_variables(variables) do |_role, memo, attrs|
|
91
|
-
attributes = JSON.parse(attrs)
|
91
|
+
attributes = JSON.parse(attrs)
|
92
92
|
var = AnsibleVariable.find attributes['id']
|
93
93
|
var.update(attributes)
|
94
94
|
memo << var
|
@@ -98,7 +98,7 @@ module ForemanAnsible
|
|
98
98
|
def delete_old_variables(variables)
|
99
99
|
iterate_over_variables(variables) do |_role, memo, attrs|
|
100
100
|
variable = AnsibleVariable.find(
|
101
|
-
JSON.parse(attrs)['
|
101
|
+
JSON.parse(attrs)['id']
|
102
102
|
)
|
103
103
|
memo << variable.key
|
104
104
|
variable.destroy
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= icon_text("play", "", :kind => "fa") %>
|
5
5
|
</div>
|
6
6
|
<h1><%= _('Ansible Roles') %></h1>
|
7
|
-
<p><%= _('No
|
7
|
+
<p><%= _('No Ansible Roles were found in Foreman. If you want to assign roles to your hosts,
|
8
8
|
you have to import them first.').html_safe %>
|
9
9
|
</p>
|
10
10
|
<p><%= link_to(_('Learn more about this in the documentation.'), documentation_url('#4.1ImportingRoles', :root_url => ansible_doc_url), target: '_blank') %></p>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%#
|
2
|
+
name: Service Action - Enable Web Console
|
3
|
+
job_category: Ansible Services
|
4
|
+
snippet: false
|
5
|
+
provider_type: Ansible
|
6
|
+
kind: job_template
|
7
|
+
model: JobTemplate
|
8
|
+
feature: ansible_enable_web_console
|
9
|
+
%>
|
10
|
+
---
|
11
|
+
- hosts: all
|
12
|
+
tasks:
|
13
|
+
- name: ensure cockpit is installed
|
14
|
+
package:
|
15
|
+
name: "cockpit-system"
|
16
|
+
state: present
|
@@ -45,7 +45,14 @@ module ForemanAnsible
|
|
45
45
|
RemoteExecutionFeature.register(
|
46
46
|
:ansible_run_capsule_upgrade,
|
47
47
|
N_('Upgrade Capsules on given hosts'),
|
48
|
-
:description => N_('Upgrade Capsules on given Capsule server hosts')
|
48
|
+
:description => N_('Upgrade Capsules on given Capsule server hosts'),
|
49
|
+
:proxy_selector_override => ::RemoteExecutionProxySelector::INTERNAL_PROXY
|
50
|
+
)
|
51
|
+
RemoteExecutionFeature.register(
|
52
|
+
:ansible_configure_cloud_connector,
|
53
|
+
N_('Configure Cloud Connector on given hosts'),
|
54
|
+
:description => N_('Configure Cloud Connector on given hosts'),
|
55
|
+
:proxy_selector_override => ::RemoteExecutionProxySelector::INTERNAL_PROXY
|
49
56
|
)
|
50
57
|
end
|
51
58
|
end
|
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: 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: 2020-
|
11
|
+
date: 2020-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman_ansible_core
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.
|
47
|
+
version: 4.2.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.
|
54
|
+
version: 4.2.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: ipaddress
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,6 +182,7 @@ files:
|
|
182
182
|
- app/views/foreman_ansible/job_templates/run_command_-_ansible_default.erb
|
183
183
|
- app/views/foreman_ansible/job_templates/run_playbook-ansible_default.erb
|
184
184
|
- app/views/foreman_ansible/job_templates/service_action_-_ansible_default.erb
|
185
|
+
- app/views/foreman_ansible/job_templates/service_action_-_enable_web_console.erb
|
185
186
|
- app/views/ui_ansible_roles/index.json.rabl
|
186
187
|
- app/views/ui_ansible_roles/main.json.rabl
|
187
188
|
- app/views/ui_ansible_roles/show.json.rabl
|
@@ -347,7 +348,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
347
348
|
- !ruby/object:Gem::Version
|
348
349
|
version: '0'
|
349
350
|
requirements: []
|
350
|
-
rubygems_version: 3.
|
351
|
+
rubygems_version: 3.1.2
|
351
352
|
signing_key:
|
352
353
|
specification_version: 4
|
353
354
|
summary: Ansible integration with Foreman (theforeman.org)
|
@@ -356,41 +357,41 @@ test_files:
|
|
356
357
|
- test/factories/ansible_roles.rb
|
357
358
|
- test/factories/ansible_variables.rb
|
358
359
|
- test/fixtures/insights_playbook.yaml
|
359
|
-
- test/fixtures/sample_facts.json
|
360
360
|
- test/fixtures/report.json
|
361
|
+
- test/fixtures/sample_facts.json
|
362
|
+
- test/functional/ansible_roles_controller_test.rb
|
363
|
+
- test/functional/ansible_variables_controller_test.rb
|
364
|
+
- test/functional/api/v2/ansible_inventories_controller_test.rb
|
361
365
|
- test/functional/api/v2/ansible_roles_controller_test.rb
|
366
|
+
- test/functional/api/v2/ansible_variables_controller_test.rb
|
362
367
|
- test/functional/api/v2/hostgroups_controller_test.rb
|
363
368
|
- test/functional/api/v2/hosts_controller_test.rb
|
364
|
-
- test/functional/api/v2/ansible_inventories_controller_test.rb
|
365
|
-
- test/functional/api/v2/ansible_variables_controller_test.rb
|
366
|
-
- test/functional/ansible_roles_controller_test.rb
|
367
|
-
- test/functional/ansible_variables_controller_test.rb
|
368
|
-
- test/functional/ui_ansible_roles_controller_test.rb
|
369
369
|
- test/functional/hosts_controller_test.rb
|
370
|
+
- test/functional/ui_ansible_roles_controller_test.rb
|
371
|
+
- test/test_plugin_helper.rb
|
370
372
|
- test/unit/actions/run_ansible_job_test.rb
|
371
373
|
- test/unit/actions/run_proxy_ansible_command_test.rb
|
374
|
+
- test/unit/ansible_role_test.rb
|
375
|
+
- test/unit/ansible_variable_test.rb
|
372
376
|
- test/unit/concerns/config_reports_extensions_test.rb
|
373
377
|
- test/unit/concerns/host_managed_extensions_test.rb
|
374
378
|
- test/unit/concerns/hostgroup_extensions_test.rb
|
375
379
|
- test/unit/helpers/ansible_reports_helper_test.rb
|
380
|
+
- test/unit/host_ansible_role_test.rb
|
381
|
+
- test/unit/hostgroup_ansible_role_test.rb
|
376
382
|
- test/unit/lib/foreman_ansible_core/command_creator_test.rb
|
377
383
|
- test/unit/lib/foreman_ansible_core/ansible_runner_test.rb
|
378
384
|
- test/unit/lib/foreman_ansible_core/playbook_runner_test.rb
|
379
385
|
- test/unit/lib/proxy_api/ansible_test.rb
|
386
|
+
- test/unit/services/ansible_report_importer_test.rb
|
387
|
+
- test/unit/services/ansible_variables_importer_test.rb
|
380
388
|
- test/unit/services/api_roles_importer_test.rb
|
389
|
+
- test/unit/services/fact_importer_test.rb
|
390
|
+
- test/unit/services/fact_parser_test.rb
|
381
391
|
- test/unit/services/fact_sparser_test.rb
|
382
392
|
- test/unit/services/insights_plan_runner_test.rb
|
383
393
|
- test/unit/services/roles_importer_test.rb
|
384
394
|
- test/unit/services/structured_fact_importer_test.rb
|
385
395
|
- test/unit/services/ui_roles_importer_test.rb
|
386
|
-
- test/unit/services/ansible_report_importer_test.rb
|
387
|
-
- test/unit/services/fact_importer_test.rb
|
388
|
-
- test/unit/services/fact_parser_test.rb
|
389
|
-
- test/unit/services/ansible_variables_importer_test.rb
|
390
396
|
- test/unit/services/inventory_creator_test.rb
|
391
|
-
- test/unit/ansible_role_test.rb
|
392
|
-
- test/unit/host_ansible_role_test.rb
|
393
|
-
- test/unit/hostgroup_ansible_role_test.rb
|
394
|
-
- test/unit/ansible_variable_test.rb
|
395
397
|
- test/unit/ansible_provider_test.rb
|
396
|
-
- test/test_plugin_helper.rb
|