foreman_maintain 1.5.0 → 1.5.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: 100d751c774b8d059da095d52e16b0f550d07cfc452dde7416c02268dceceea0
4
- data.tar.gz: 4d321b112aed2dd01a6f4175a66ce0f70a58b40a66da9b476bda3eb12a4697ca
3
+ metadata.gz: b7b478817815b6f14e75a5589f7ebc3b7f810693ecf127b6dadb9d6336b6071a
4
+ data.tar.gz: 2387b343d12df0c0cf30505213ff5e4dd2041903c5510a4a467ddddd34334c73
5
5
  SHA512:
6
- metadata.gz: 3b1760b02ab02ad1918de24f7aef1f761cf24aefb76ab0191d360cd14b430255926fff5971b349f7f18cd0736664add545af2a3a0a04b73e3e6e71a7b75952ae
7
- data.tar.gz: 806f8f9c132c662b9e5a812520589a59c4986783b1962389705d5743f901bfd157c5fb9bf4c16455c80678d3033648d6f0ee36f41045bbbae59e097d62381624
6
+ metadata.gz: 39348cd63dc6728f48462cdcfab927c223af1966d74a5d256d5b85a9518a2732c4b407639d39cc9f6801cd11b1f50d94875754a994b25d2ffe62bb15e5e520ce
7
+ data.tar.gz: 233afee76a95e53ef9cc0bd324a6d16acc8d23b4158e5977aa03321553f14d1dd4c472045beb3b2f88bc9b31e0da3792f640f01538656174e4ea538bb9881b8e
@@ -94,11 +94,7 @@ class Features::ForemanProxy < ForemanMaintain::Feature
94
94
  end
95
95
 
96
96
  def certs_param_name
97
- if check_min_version('foreman', '1.21')
98
- return { :param_section => 'certs', :param_key => 'tar_file' }
99
- end
100
-
101
- { :param_section => 'foreman_proxy_content', :param_key => 'certs_tar' }
97
+ { :param_section => 'certs', :param_key => 'tar_file' }
102
98
  end
103
99
 
104
100
  def certs_tar
@@ -7,11 +7,12 @@ module Procedures::Packages
7
7
  param :warn_on_errors, 'Do not interrupt scenario on failure',
8
8
  :flag => true, :default => false
9
9
  param :dnf_options, 'Extra dnf options if any', :array => true, :default => []
10
+ param :clean_cache, 'If true will cause a DNF cache clean', :flag => true, :default => true
10
11
  end
11
12
 
12
13
  def run
13
14
  assumeyes_val = @assumeyes.nil? ? assumeyes? : @assumeyes
14
- package_manager.clean_cache(:assumeyes => assumeyes_val)
15
+ package_manager.clean_cache(:assumeyes => assumeyes_val) if @clean_cache
15
16
  opts = { :assumeyes => assumeyes_val, :dnf_options => @dnf_options }
16
17
  packages_action(:update, @packages, opts)
17
18
  rescue ForemanMaintain::Error::ExecutionError => e
@@ -27,11 +28,15 @@ module Procedures::Packages
27
28
  end
28
29
 
29
30
  def description
30
- if @dnf_options.include?('--downloadonly')
31
+ if download_only?
31
32
  "Download package(s) #{@packages.join(', ')}"
32
33
  else
33
34
  "Update package(s) #{@packages.join(', ')}"
34
35
  end
35
36
  end
37
+
38
+ def download_only?
39
+ @dnf_options.include?('--downloadonly')
40
+ end
36
41
  end
37
42
  end
@@ -38,6 +38,14 @@ module Scenarios::Capsule_6_16
38
38
  end
39
39
 
40
40
  def compose
41
+ add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
42
+ modules_to_enable = ["satellite-capsule:#{el_short_name}"]
43
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
44
+ add_step(Procedures::Packages::Update.new(
45
+ :assumeyes => true,
46
+ :dnf_options => ['--downloadonly']
47
+ ))
48
+
41
49
  add_steps(find_procedures(:pre_migrations))
42
50
  end
43
51
  end
@@ -53,13 +61,8 @@ module Scenarios::Capsule_6_16
53
61
  end
54
62
 
55
63
  def compose
56
- add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
57
- modules_to_enable = ["satellite-capsule:#{el_short_name}"]
58
- add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
59
- add_step(Procedures::Packages::Update.new(:assumeyes => true,
60
- :dnf_options => ['--downloadonly']))
61
64
  add_step(Procedures::Service::Stop.new)
62
- add_step(Procedures::Packages::Update.new(:assumeyes => true))
65
+ add_step(Procedures::Packages::Update.new(:assumeyes => true, :clean_cache => false))
63
66
  add_step_with_context(Procedures::Installer::Upgrade)
64
67
  end
65
68
  end
@@ -38,6 +38,13 @@ module Scenarios::Capsule_6_16_z
38
38
  end
39
39
 
40
40
  def compose
41
+ add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
42
+ modules_to_enable = ["satellite-capsule:#{el_short_name}"]
43
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
44
+ add_step(Procedures::Packages::Update.new(
45
+ :assumeyes => true,
46
+ :dnf_options => ['--downloadonly']
47
+ ))
41
48
  add_steps(find_procedures(:pre_migrations))
42
49
  end
43
50
  end
@@ -53,13 +60,8 @@ module Scenarios::Capsule_6_16_z
53
60
  end
54
61
 
55
62
  def compose
56
- add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
57
- modules_to_enable = ["satellite-capsule:#{el_short_name}"]
58
- add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
59
- add_step(Procedures::Packages::Update.new(:assumeyes => true,
60
- :dnf_options => ['--downloadonly']))
61
63
  add_step(Procedures::Service::Stop.new)
62
- add_step(Procedures::Packages::Update.new(:assumeyes => true))
64
+ add_step(Procedures::Packages::Update.new(:assumeyes => true, :clean_cache => false))
63
65
  add_step_with_context(Procedures::Installer::Upgrade)
64
66
  end
65
67
  end
@@ -54,10 +54,12 @@ module Scenarios::Katello_Nightly
54
54
  add_step(Procedures::Repositories::Setup.new(:version => 'nightly'))
55
55
  modules_to_enable = ["katello:#{el_short_name}", "pulpcore:#{el_short_name}"]
56
56
  add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
57
- add_step(Procedures::Packages::Update.new(:assumeyes => true,
58
- :dnf_options => ['--downloadonly']))
57
+ add_step(Procedures::Packages::Update.new(
58
+ :assumeyes => true,
59
+ :dnf_options => ['--downloadonly']
60
+ ))
59
61
  add_step(Procedures::Service::Stop.new)
60
- add_step(Procedures::Packages::Update.new(:assumeyes => true))
62
+ add_step(Procedures::Packages::Update.new(:assumeyes => true, :clean_cache => false))
61
63
  add_step_with_context(Procedures::Installer::Upgrade)
62
64
  end
63
65
  end
@@ -38,6 +38,13 @@ module Scenarios::Satellite_6_16
38
38
  end
39
39
 
40
40
  def compose
41
+ add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
42
+ modules_to_enable = ["satellite:#{el_short_name}"]
43
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
44
+ add_step(Procedures::Packages::Update.new(
45
+ :assumeyes => true,
46
+ :dnf_options => ['--downloadonly']
47
+ ))
41
48
  add_steps(find_procedures(:pre_migrations))
42
49
  end
43
50
  end
@@ -54,13 +61,8 @@ module Scenarios::Satellite_6_16
54
61
  end
55
62
 
56
63
  def compose
57
- add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
58
- modules_to_enable = ["satellite:#{el_short_name}"]
59
- add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
60
- add_step(Procedures::Packages::Update.new(:assumeyes => true,
61
- :dnf_options => ['--downloadonly']))
62
64
  add_step(Procedures::Service::Stop.new)
63
- add_step(Procedures::Packages::Update.new(:assumeyes => true))
65
+ add_step(Procedures::Packages::Update.new(:assumeyes => true, :clean_cache => false))
64
66
  add_step_with_context(Procedures::Installer::Upgrade)
65
67
  add_step(Procedures::Installer::UpgradeRakeTask)
66
68
  end
@@ -38,6 +38,13 @@ module Scenarios::Satellite_6_16_z
38
38
  end
39
39
 
40
40
  def compose
41
+ add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
42
+ modules_to_enable = ["satellite:#{el_short_name}"]
43
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
44
+ add_step(Procedures::Packages::Update.new(
45
+ :assumeyes => true,
46
+ :dnf_options => ['--downloadonly']
47
+ ))
41
48
  add_steps(find_procedures(:pre_migrations))
42
49
  end
43
50
  end
@@ -53,13 +60,8 @@ module Scenarios::Satellite_6_16_z
53
60
  end
54
61
 
55
62
  def compose
56
- add_step(Procedures::Repositories::Setup.new(:version => '6.16'))
57
- modules_to_enable = ["satellite:#{el_short_name}"]
58
- add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
59
- add_step(Procedures::Packages::Update.new(:assumeyes => true,
60
- :dnf_options => ['--downloadonly']))
61
63
  add_step(Procedures::Service::Stop.new)
62
- add_step(Procedures::Packages::Update.new(:assumeyes => true))
64
+ add_step(Procedures::Packages::Update.new(:assumeyes => true, :clean_cache => false))
63
65
  add_step_with_context(Procedures::Installer::Upgrade)
64
66
  add_step(Procedures::Installer::UpgradeRakeTask)
65
67
  end
@@ -92,7 +92,7 @@ module ForemanMaintain::PackageManager
92
92
  end
93
93
 
94
94
  def clean_cache(assumeyes: false)
95
- dnf_action('clean', 'all', :assumeyes => assumeyes)
95
+ dnf_action('clean', 'metadata', :assumeyes => assumeyes)
96
96
  end
97
97
 
98
98
  def module_enabled?(name)
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.5.0'.freeze
2
+ VERSION = '1.5.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_maintain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-03 00:00:00.000000000 Z
11
+ date: 2024-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp