Skip to content

Commit

Permalink
(node/tang03.cp.lsst.org) add static ip
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Apr 8, 2024
1 parent 33e7bc1 commit 6fee63e
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
18 changes: 18 additions & 0 deletions hieradata/node/tang03.cp.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
nm::connections:
enp1s0:
content:
connection:
id: "enp1s0"
uuid: "03da7500-2101-c722-2438-d0d006c28c73"
type: "ethernet"
interface-name: "enp1s0"
ethernet: {}
ipv4:
address1: "139.229.161.6/27,139.229.161.30"
dns: "139.229.160.53;139.229.160.54;139.229.160.55;"
dns-search: "cp.lsst.org;"
method: "manual"
ipv6:
method: "disabled"
proxy: {}
46 changes: 46 additions & 0 deletions spec/hosts/nodes/tang03.cp.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'tang03.cp.lsst.org', :sitepp do
on_supported_os.each do |os, os_facts|
next unless os =~ %r{almalinux-9-x86_64}

context "on #{os}" do
let(:facts) do
override_facts(os_facts,
fqdn: 'tang03.cp.lsst.org',
is_virtual: true,
virtual: 'kvm',
dmi: {
'product' => {
'name' => 'KVM',
},
})
end
let(:node_params) do
{
role: 'tang',
site: 'cp',
}
end

it { is_expected.to compile.with_all_deps }

include_examples 'vm'
include_context 'with nm interface'
it { is_expected.to have_nm__connection_resource_count(1) }

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

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm ethernet interface'
it_behaves_like 'nm manual interface'
it { expect(nm_keyfile['ipv4']['address1']).to eq('139.229.161.6/27,139.229.161.30') }
it { expect(nm_keyfile['ipv4']['dns']).to eq('139.229.160.53;139.229.160.54;139.229.160.55;') }
it { expect(nm_keyfile['ipv4']['dns-search']).to eq('cp.lsst.org;') }
end
end # on os
end # on_supported_os
end

0 comments on commit 6fee63e

Please sign in to comment.