Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(rke role) restrict inclusion of clustershell class to EL7/EL8 #710

Merged
merged 1 commit into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion hieradata/role/rke.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
classes:
- "clustershell"
- "kubectl"
- "profile::core::common"
- "profile::core::debugutils"
Expand Down
3 changes: 3 additions & 0 deletions hieradata/role/rke/osfamily/RedHat/major/7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
classes:
- "clustershell"
3 changes: 3 additions & 0 deletions hieradata/role/rke/osfamily/RedHat/major/8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
classes:
- "clustershell"
15 changes: 11 additions & 4 deletions spec/hosts/roles/rke_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'spec_helper'

shared_examples 'generic rke' do
shared_examples 'generic rke' do |facts:|
include_examples 'debugutils'
include_examples 'docker'
include_examples 'rke profile'
Expand All @@ -15,6 +15,14 @@
.with_content(%r{^alias k='kubectl'$})
.with_content(%r{^complete -o default -F __start_kubectl k$})
end

if facts[:os]['family'] == 'RedHat'
if facts[:os]['release']['major'] == '9'
it { is_expected.not_to contain_class('clustershell') }
else
it { is_expected.to contain_class('clustershell') }
end
end
end

role = 'rke'
Expand Down Expand Up @@ -42,8 +50,7 @@
it { is_expected.to compile.with_all_deps }

include_examples 'common', facts: facts

include_examples 'generic rke'
include_examples 'generic rke', facts: facts
end # host
end # lsst_sites

Expand All @@ -61,7 +68,7 @@
it { is_expected.to compile.with_all_deps }

include_examples 'common', facts: facts
include_examples 'generic rke'
include_examples 'generic rke', facts: facts
end
end
end # on os
Expand Down