Skip to content

Commit

Permalink
(node/tang03.dev.lsst.org) add static ip
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Nov 9, 2023
1 parent e015238 commit 22f4ef9
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
22 changes: 22 additions & 0 deletions hieradata/node/tang03.dev.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
nm::connections:
enp1s0:
content: |
[connection]
id=enp1s0
uuid=03da7500-2101-c722-2438-d0d006c28c73
type=ethernet
interface-name=enp1s0
[ethernet]
[ipv4]
address1=139.229.134.59/24,139.229.134.254
dns=139.229.134.53;139.229.135.54;139.229.135.55;
dns-search=dev.lsst.org;
method=manual
[ipv6]
method=ignore
[proxy]
46 changes: 46 additions & 0 deletions spec/hosts/nodes/tang03.dev.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.dev.lsst.org', :sitepp do
on_supported_os.each do |os, facts|
next unless os =~ %r{almalinux-9-x86_64}

context "on #{os}" do
let(:facts) do
override_facts(facts,
fqdn: 'tang03.dev.lsst.org',
is_virtual: true,
virtual: 'kvm',
dmi: {
'product' => {
'name' => 'KVM',
},
})
end
let(:node_params) do
{
role: 'tang',
site: 'dev',
}
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 { expect(nm_keyfile['ipv4']['address1']).to eq('139.229.134.59/24,139.229.134.254') }
it { expect(nm_keyfile['ipv4']['dns']).to eq('139.229.134.53;139.229.135.54;139.229.135.55;') }
it { expect(nm_keyfile['ipv4']['dns-search']).to eq('dev.lsst.org;') }
it { expect(nm_keyfile['ipv4']['method']).to eq('manual') }
end
end # on os
end # on_supported_os
end

0 comments on commit 22f4ef9

Please sign in to comment.