Skip to content

Commit

Permalink
(chango) add network config and role
Browse files Browse the repository at this point in the history
  • Loading branch information
dtapiacl committed Sep 25, 2023
1 parent cd25ca5 commit 3fdf0b5
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
17 changes: 17 additions & 0 deletions hieradata/cluster/chango.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
clustershell::groupmembers:
chango: {group: "chango", member: "chango[01-03]"}
profile::core::rke::version: "1.4.6-rc4"
nm::connections:
eno1: #fqdn
content: |
[connection]
id=eno1
uuid=de9904c8-9577-1a17-36b1-34b94132f06a
type=ethernet
interface-name=eno1
[ethernet]
[ipv4]
method=auto
[ipv6]
method=disabled
4 changes: 4 additions & 0 deletions hieradata/cluster/chango/role/rke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
classes:
- "profile::core::sysctl::rp_filter"
profile::core::sysctl::rp_filter::enable: false
56 changes: 56 additions & 0 deletions spec/hosts/nodes/chango01.ls.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'chango01.ls.lsst.org', :sitepp do
alma9 = FacterDB.get_facts({ operatingsystem: 'AlmaLinux', operatingsystemmajrelease: '9' }).first
# rubocop:disable Naming/VariableNumber
{ 'almalinux-9-x86_64': alma9 }.each do |os, facts|
# rubocop:enable Naming/VariableNumber
context "on #{os}" do
let(:facts) { override_facts(facts, fqdn: 'chango01.ls.lsst.org') }
let(:node_params) do
{
role: 'rke',
site: 'ls',
cluster: 'chango',
}
end

include_context 'with nm interface'

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_class('profile::core::sysctl::rp_filter').with_enable(false)
end

it do
is_expected.to contain_class('clustershell').with(
groupmembers: {
'chango' => {
'group' => 'chango',
'member' => 'chango[01-03]',
},
},
)
end

it do
is_expected.to contain_class('profile::core::rke').with(
version: '1.4.6-rc4',
)
end

it { is_expected.to have_nm__connection_resource_count(1) }

context 'with eno1' do
let(:interface) { 'eno1' }

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm dhcp interface'
it_behaves_like 'nm ethernet interface'
end
end # on os
end # on_supported_os
end

0 comments on commit 3fdf0b5

Please sign in to comment.