simp-beaker-helpers 1.26.1 → 1.28.0

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: b361d19ffb83f7ce149363e948e0e9580d6c85c378638bbaff77d6252d36f1e1
4
- data.tar.gz: edaf5e05b246e96ea81e33c588c9c3d71d7e1f610ef5f782e0d02be6dc2c5816
3
+ metadata.gz: 893037080c5711de66388dabf435c509163179798e9dd79d1f842a45e1ab4cc2
4
+ data.tar.gz: be745da1931e76ba7ec1ee393da84563ef7b35f7aaf915b52a4d73228490db1c
5
5
  SHA512:
6
- metadata.gz: 63232d87cc0b63deef62fbb61964aa0cd2a60935ea5a2746c76cecf2d261601c89b8703e36325052c9243bdee4f023e2591b7dcc8b8354b13cbe0f03c3881d4c
7
- data.tar.gz: c2019a1a3aa4fc7b2b4d10e00e1fd87318926c55e9e3572892d24f2b314c37bbdbba7f56ac8fdf20948cf1674a133cf85c82d3366372d8460114ed1e83f7ab0f
6
+ metadata.gz: f6abb6b44e5489fe7d18111076140f560959076c79815fce68793346353a0d60d8071cc67407376c1f4a2d033d363100efc77f6a7ef6cca877a44ef699623402
7
+ data.tar.gz: d03bbcb53b3f74d8f3d907b878cc46b7991057e18a179257342bf9533f96216e5374d16066095f7e80e08df381576641b87d7f7d5c8a3dcb8826040f7266663a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ### 1.28.0 / 2022-08-05
2
+ * Added:
3
+ * Support RHEL versions without RHN credentials
4
+ * Supports pay-as-you-go cloud services
5
+
6
+ ### 1.27.0 / 2022-07-30
7
+ * Added:
8
+ * Add EPEL support for Amazon, Rocky, and Alma distributions
9
+
10
+ ### 1.26.2 / 2022-07-26
11
+ * Fixed:
12
+ * Limit the length of the CN field of the certificates to 64 bytes
13
+
1
14
  ### 1.26.1 / 2022-06-24
2
15
  * Fixed:
3
16
  * Ensure that `multi_node` is enabled by default for backwards compatibility
data/files/pki/make.sh CHANGED
@@ -46,7 +46,7 @@ for hosts in $*; do
46
46
  echo "-- $hname"
47
47
  mkdir -p "${keydist}/${hname}/cacerts"
48
48
 
49
- sed -e "s/#HOSTNAME#/${hname}/" template_host.cnf > "working/${hname}.cnf"
49
+ sed -e "s/#HOSTNAME#/${hname:0:63}/" template_host.cnf > "working/${hname}.cnf"
50
50
 
51
51
  if [ "$hname" != "$hosts" ];
52
52
  then
@@ -1,5 +1,5 @@
1
1
  module Simp; end
2
2
 
3
3
  module Simp::BeakerHelpers
4
- VERSION = '1.26.1'
4
+ VERSION = '1.28.0'
5
5
  end
@@ -636,14 +636,14 @@ module Simp::BeakerHelpers
636
636
 
637
637
  # This is based on the official EPEL docs https://fedoraproject.org/wiki/EPEL
638
638
  case os_info['name']
639
- when 'RedHat','CentOS'
639
+ when 'RedHat','CentOS','AlmaLinux','Rocky'
640
640
  install_latest_package_on(
641
641
  sut,
642
642
  'epel-release',
643
643
  "https://dl.fedoraproject.org/pub/epel/epel-release-latest-#{os_maj_rel}.noarch.rpm",
644
644
  )
645
645
 
646
- if os_info['name'] == 'RedHat'
646
+ if os_info['name'] == 'RedHat' && ENV['BEAKER_RHSM_USER'] && ENV['BEAKER_RHSM_PASS']
647
647
  if os_maj_rel == '7'
648
648
  on sut, %{subscription-manager repos --enable "rhel-*-optional-rpms"}
649
649
  on sut, %{subscription-manager repos --enable "rhel-*-extras-rpms"}
@@ -655,7 +655,7 @@ module Simp::BeakerHelpers
655
655
  end
656
656
  end
657
657
 
658
- if os_info['name'] == 'CentOS'
658
+ if ['CentOS','AlmaLinux','Rocky'].include?(os_info['name'])
659
659
  if os_maj_rel == '8'
660
660
  # 8.0 fallback
661
661
  install_latest_package_on(sut, 'dnf-plugins-core')
@@ -665,8 +665,9 @@ module Simp::BeakerHelpers
665
665
  when 'OracleLinux'
666
666
  package_name = "oracle-epel-release-el#{os_maj_rel}"
667
667
  install_latest_package_on(sut,package_name)
668
+ when 'Amazon'
669
+ on sut, %{amazon-linux-extras install epel -y}
668
670
  end
669
-
670
671
  end
671
672
  end
672
673
  end
@@ -773,12 +774,19 @@ module Simp::BeakerHelpers
773
774
  end
774
775
  end
775
776
 
776
- if ['CentOS','RedHat','OracleLinux'].include?(os_info['name'])
777
+ if [
778
+ 'AlmaLinux',
779
+ 'Amazon',
780
+ 'CentOS',
781
+ 'OracleLinux',
782
+ 'RedHat',
783
+ 'Rocky'
784
+ ].include?(os_info['name'])
777
785
  enable_yum_repos_on(sut)
778
786
  enable_epel_on(sut)
779
787
 
780
788
  # net-tools required for netstat utility being used by be_listening
781
- if os_info['release']['major'].to_i >= 7
789
+ if (os_info['release']['major'].to_i >= 7) ||((os_info['name'] == 'Amazon') && (os_info['release']['major'].to_i >= 2))
782
790
  pp = <<-EOS
783
791
  package { 'net-tools': ensure => installed }
784
792
  EOS
@@ -828,7 +836,8 @@ module Simp::BeakerHelpers
828
836
 
829
837
  if os == 'RedHat'
830
838
  unless rhsm_opts[:username] && rhsm_opts[:password]
831
- fail("You must set BEAKER_RHSM_USER and BEAKER_RHSM_PASS environment variables to register RHEL systems")
839
+ warn("BEAKER_RHSM_USER and/or BEAKER_RHSM_PASS not set on RHEL system.", "Assuming that subscription-manager is not needed. This may prevent packages from installing")
840
+ return
832
841
  end
833
842
 
834
843
  sub_status = on(sut, 'subscription-manager status', :accept_all_exit_codes => true)
@@ -866,24 +875,30 @@ module Simp::BeakerHelpers
866
875
  end
867
876
 
868
877
  def rhel_repo_enable(suts, repos)
869
- block_on(suts, :run_in_parallel => @run_in_parallel) do |sut|
870
- Array(repos).each do |repo|
871
- on(sut, %{subscription-manager repos --enable #{repo}})
878
+ if ENV['BEAKER_RHSM_USER'] && ENV['BEAKER_RHSM_PASS']
879
+ block_on(suts, :run_in_parallel => @run_in_parallel) do |sut|
880
+ Array(repos).each do |repo|
881
+ on(sut, %{subscription-manager repos --enable #{repo}})
882
+ end
872
883
  end
873
884
  end
874
885
  end
875
886
 
876
887
  def rhel_repo_disable(suts, repos)
877
- block_on(suts, :run_in_parallel => @run_in_parallel) do |sut|
878
- Array(repos).each do |repo|
879
- on(sut, %{subscription-manager repos --disable #{repo}}, :accept_all_exit_codes => true)
888
+ if ENV['BEAKER_RHSM_USER'] && ENV['BEAKER_RHSM_PASS']
889
+ block_on(suts, :run_in_parallel => @run_in_parallel) do |sut|
890
+ Array(repos).each do |repo|
891
+ on(sut, %{subscription-manager repos --disable #{repo}}, :accept_all_exit_codes => true)
892
+ end
880
893
  end
881
894
  end
882
895
  end
883
896
 
884
897
  def rhel_rhsm_unsubscribe(suts)
885
- block_on(suts, :run_in_parallel => @run_in_parallel) do |sut|
886
- on(sut, %{subscription-manager unregister}, :accept_all_exit_codes => true)
898
+ if ENV['BEAKER_RHSM_USER'] && ENV['BEAKER_RHSM_PASS']
899
+ block_on(suts, :run_in_parallel => @run_in_parallel) do |sut|
900
+ on(sut, %{subscription-manager unregister}, :accept_all_exit_codes => true)
901
+ end
887
902
  end
888
903
  end
889
904
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-beaker-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.26.1
4
+ version: 1.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-06-24 00:00:00.000000000 Z
12
+ date: 2022-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beaker