foreman_ansible 12.0.4 → 12.0.5

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22cc24fd5fb87553931501f3210e8d72610544b2a5d212b1d2f428ec93145f07
4
- data.tar.gz: afb38c5c00658c8ca6d5f6e9f3d5a366b8d59a3f19a390905f266751998283b7
3
+ metadata.gz: 0cd55a2ddf8df44c624123856e3635e0ded3c7298a27eec17ba9894eb3bdaa98
4
+ data.tar.gz: c336b32e93e57dde9c353243bd15783d76270c20f574590b5f7dddc3bd1821ba
5
5
  SHA512:
6
- metadata.gz: 63670d49e925b97f3681dd76e608f4184ddc767e43da27427b4b6995518d261ecc4979f1aa06010fe15d102556f70a6e01e8fbe720e7bb3c4664aa84b8881386
7
- data.tar.gz: a0fcb6a2004173a0847ca85a2ef648136575787d4525e553bf08f94f05a5d4d46ef42bbc7c198b9edd7daa3a2cf5c489eba549a27b67ca1344eb25ac21013751
6
+ metadata.gz: ac40846ddd67fc654d48abf4be65693643beb2c77ac5494e4ab3d7f05f256ebc0c496f2139425a360f58c2161a103e3c721458bfbff3b59e7070307c1550e027
7
+ data.tar.gz: 132ae4c6caefd1e62fca2d9a78c9f7188a850edfa164c37146a67589978ccfb07dace7536be3dd8447c981854655ecd3b571b3df6180fe3f38fedcd50da3a2c4
@@ -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.5'
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",
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.5
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-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_list