foreman_ansible 12.0.4 → 12.0.6

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: 22cc24fd5fb87553931501f3210e8d72610544b2a5d212b1d2f428ec93145f07
4
- data.tar.gz: afb38c5c00658c8ca6d5f6e9f3d5a366b8d59a3f19a390905f266751998283b7
3
+ metadata.gz: 07d888a82b968caca3ffd9beedfe82d193fd884daf39e11b6733adb568c429ec
4
+ data.tar.gz: 0ba07c7fdfcde767ccada3f02b4ce059299538d6d58b2af8892285b2a1892b1e
5
5
  SHA512:
6
- metadata.gz: 63670d49e925b97f3681dd76e608f4184ddc767e43da27427b4b6995518d261ecc4979f1aa06010fe15d102556f70a6e01e8fbe720e7bb3c4664aa84b8881386
7
- data.tar.gz: a0fcb6a2004173a0847ca85a2ef648136575787d4525e553bf08f94f05a5d4d46ef42bbc7c198b9edd7daa3a2cf5c489eba549a27b67ca1344eb25ac21013751
6
+ metadata.gz: cf8f214d967994b1dd34cc0424c2fc587637e210659b5fa9ef102f1efc2da59fb09a50a5eafae56e854fa136a1aac0b76ee37021f0d96e40d5beaf51ff39dc78
7
+ data.tar.gz: d0f92731bf028681ee9de4fd351074548d1f07e87a5bbcfbb8b852aafc90269a39194b3099ef3ab2286c465f69137a342b7d06736ba6b1020e9a8ea2365c3215
@@ -50,7 +50,7 @@ module ForemanAnsible
50
50
  @inherited_ansible_roles = @hostgroup.inherited_ansible_roles
51
51
  @directly_assigned_roles = @hostgroup.ansible_roles
52
52
  @ansible_roles = (
53
- @directly_assigned_roles + @inherited_ansible_roles + @hostgroup.host_ansible_roles
53
+ @directly_assigned_roles + @inherited_ansible_roles
54
54
  ).uniq
55
55
  end
56
56
 
@@ -26,7 +26,7 @@ template_inputs:
26
26
  input_type: user
27
27
  description: "The convert2rhel utility uploads the following data about the system
28
28
  conversion to Red Hat servers for the purpose of the utility usage analysis:<br>\r\n-
29
- The conver2rhel command as executed<br>\r\n- The convert2rhel RPM version and
29
+ The convert2rhel command as executed<br>\r\n- The convert2rhel RPM version and
30
30
  GPG signature<br>\r\n- Success or failure status of the conversion<br>\r\n- Conversion
31
31
  start and end timestamps<br>\r\n- Source OS vendor and version<br>\r\n- Target
32
32
  RHEL version<br>\r\n- convert2rhel related environment variables<br>"
@@ -2,6 +2,16 @@
2
2
 
3
3
  organizations = Organization.unscoped.all
4
4
  locations = Location.unscoped.all
5
+
6
+ template_files = Dir[File.join("#{ForemanAnsible::Engine.root}/app/views/foreman_ansible/job_templates/**/*.erb")]
7
+
8
+ unsupported_templates =
9
+ if Foreman::Plugin.find('foreman_theme_satellite').present?
10
+ { 'Smart Proxy Upgrade Playbook': 'smart_proxy_upgrade_-_ansible_default.erb' }
11
+ else
12
+ { 'Capsule Upgrade Playbook': 'capsule_upgrade_-_ansible_default.erb' }
13
+ end
14
+
5
15
  User.as_anonymous_admin do
6
16
  RemoteExecutionFeature.without_auditing do
7
17
  if Rails.env.test? || Foreman.in_rake?
@@ -13,8 +23,7 @@ User.as_anonymous_admin do
13
23
  ForemanAnsible::Engine.register_rex_feature
14
24
  end
15
25
  JobTemplate.without_auditing do
16
- Dir[File.join("#{ForemanAnsible::Engine.root}/app/views/foreman_ansible/"\
17
- 'job_templates/**/*.erb')].each do |template|
26
+ template_files.reject { |template| unsupported_templates.value?(File.basename(template)) }.each do |template|
18
27
  sync = !Rails.env.test? && Setting[:remote_execution_sync_templates]
19
28
  template = JobTemplate.import_raw!(File.read(template),
20
29
  :default => true,
@@ -23,6 +32,13 @@ User.as_anonymous_admin do
23
32
  template.organizations = organizations if template.present?
24
33
  template.locations = locations if template.present?
25
34
  end
35
+
36
+ unsupported_templates_in_db = JobTemplate.where(name: unsupported_templates.keys)
37
+
38
+ if unsupported_templates_in_db.any?
39
+ unsupported_templates_in_db.update_all(locked: false)
40
+ unsupported_templates_in_db.destroy_all
41
+ end
26
42
  end
27
43
  end
28
44
  end
@@ -4,5 +4,5 @@
4
4
  # This way other parts of Foreman can just call ForemanAnsible::VERSION
5
5
  # and detect what version the plugin is running.
6
6
  module ForemanAnsible
7
- VERSION = '12.0.4'
7
+ VERSION = '12.0.6'
8
8
  end
data/package.json CHANGED
@@ -18,7 +18,6 @@
18
18
  "@theforeman/builder": ">= 12.0.1",
19
19
  "@theforeman/eslint-plugin-foreman": ">= 12.0.1",
20
20
  "@theforeman/find-foreman": ">= 12.0.1",
21
- "@theforeman/stories": ">= 12.0.1",
22
21
  "@theforeman/test": ">= 12.0.1",
23
22
  "@theforeman/vendor-dev": ">= 12.0.1",
24
23
  "babel-eslint": "^10.0.3",
@@ -4,8 +4,13 @@ import { sprintf, translate as __ } from 'foremanReact/common/I18n';
4
4
 
5
5
  import { showToast } from '../../../../toastHelper';
6
6
 
7
- const formatSourceLink = currentValue =>
8
- `${__(currentValue.element)}: ${currentValue.elementName}`;
7
+ function formatSourceLink(currentValue) {
8
+ const element =
9
+ typeof currentValue.element !== 'string'
10
+ ? currentValue.element.toString()
11
+ : currentValue.element;
12
+ return `${__(element)}: ${currentValue.elementName}`;
13
+ }
9
14
 
10
15
  export const formatSourceAttr = variable =>
11
16
  variable.currentValue
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: 12.0.4
4
+ version: 12.0.6
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: 2023-06-08 00:00:00.000000000 Z
11
+ date: 2023-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_list