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

Add Ubuntu 24.04 support #463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ jobs:
value: ubuntu2004-64vpnserver.ma{hostname=vpnserver}-ubuntu2004-64vpnclienta.a{hostname=vpnclienta}
- name: Ubuntu 22.04
value: ubuntu2204-64vpnserver.ma{hostname=vpnserver}-ubuntu2204-64vpnclienta.a{hostname=vpnclienta}
- name: Ubuntu 24.04
value: ubuntu2404-64vpnserver.ma{hostname=vpnserver}-ubuntu2404-64vpnclienta.a{hostname=vpnclienta}
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions data/family/Debian/24.04.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
openvpn::default_easyrsa_ver: '3.0'
2 changes: 1 addition & 1 deletion lib/facter/easyrsa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
binaryv3 = '/usr/share/easy-rsa/3/easyrsa'
when %r{Ubuntu|Debian}
case operatingsystemrelease
when %r{9|10|11|18.04|20.04|22.04}
when %r{9|10|11|18.04|20.04|22.04|24.04}
binaryv2 = '/usr/share/easy-rsa/pkitool'
binaryv3 = '/usr/share/easy-rsa/easyrsa'
else
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"20.04",
"22.04"
"22.04",
"24.04"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/openvpn_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
server_directory = '/etc/openvpn'
client_directory = '/etc/openvpn'
client_service = 'openvpn'
if fact('os.release.major') =~ %r{10|11|20.04|22.04}
if fact('os.release.major') =~ %r{10|11|20.04|22.04|24.04}
server_crt = "#{server_directory}/test_openvpn_server/easy-rsa/keys/issued/server.crt"
key_path = "#{server_directory}/test_openvpn_server/easy-rsa/keys/private"
crt_path = "#{server_directory}/test_openvpn_server/easy-rsa/keys/issued"
Expand All @@ -45,7 +45,7 @@
# Default value is with ciphers too recent for old OSes like ubuntu 14.04.
describe 'server defined type' do
context 'with basics parameters' do
it 'installs openvpn server idempotently' do

Check failure on line 48 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters installs openvpn server idempotently Failure/Error: apply_manifest_on(hosts_as('vpnserver'), pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'vpnserver' exited with 6 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_104816520.pp.pXVFON Last 10 lines of output were: Warning: /Stage[main]/Main/Openvpn::Server[test_openvpn_server]/Openvpn::Ca[test_openvpn_server]/Exec[create crl.pem on test_openvpn_server]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Server[test_openvpn_server]/Openvpn::Ca[test_openvpn_server]/Exec[copy created crl.pem to test_openvpn_server keys directory]: Skipping because of failed dependencies �[mNotice: /Stage[main]/Main/Openvpn::Server[test_openvpn_server]/Openvpn::Ca[test_openvpn_server]/File[/etc/openvpn/test_openvpn_server/keys]/ensure: created Warning: /Stage[main]/Main/Openvpn::Server[test_openvpn_server]/Openvpn::Ca[test_openvpn_server]/File[/etc/openvpn/test_openvpn_server/crl.pem]: Skipping because of failed dependencies Info: Openvpn::Ca[test_openvpn_server]: Unscheduling all events on Openvpn::Ca[test_openvpn_server] Info: /Stage[main]/Main/Openvpn::Server[test_openvpn_server]/Service[openvpn@test_openvpn_server]: Unscheduling all events on Service[openvpn@test_openvpn_server] Info: Openvpn::Server[test_openvpn_server]: Unscheduling all events on Openvpn::Server[test_openvpn_server] Warning: /Stage[main]/Main/Openvpn::Server[test_openvpn_server]/Service[openvpn@test_openvpn_server]: Skipping because of failed dependencies Info: Stage[main]: Unscheduling all events on Stage[main] �[mNotice: Applied catalog in 8.91 seconds
pp = %(
openvpn::server { 'test_openvpn_server':
country => 'CO',
Expand All @@ -63,7 +63,7 @@
apply_manifest_on(hosts_as('vpnserver'), pp, catch_changes: true)
end

it 'creates openvpn client certificate idempotently' do

Check failure on line 66 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters creates openvpn client certificate idempotently Failure/Error: apply_manifest_on(hosts_as('vpnserver'), pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'vpnserver' exited with 4 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_104827289.pp.sseKuN Last 10 lines of output were: Warning: /Stage[main]/Main/Openvpn::Client[vpnclienta]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/ca_open_tag]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/ca_open_tag]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclienta]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/ca]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/ca]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclienta]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/ca_close_tag]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/ca_close_tag]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclienta]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/key_open_tag]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/key_open_tag]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclienta]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/key]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/key]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclienta]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/key_close_tag]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/key_close_tag]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclienta]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/cert_open_tag]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/cert_open_tag]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclienta]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/cert]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/cert]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclienta]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/cert_close_tag]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclienta.ovpn/cert_close_tag]: Skipping because of failed dependencies �[mNotice: Applied catalog in 0.85 seconds
pp = %(
openvpn::server { 'test_openvpn_server':
country => 'CO',
Expand All @@ -88,7 +88,7 @@
apply_manifest_on(hosts_as('vpnserver'), pp, catch_changes: true)
end

it 'revokes openvpn client certificate' do

Check failure on line 91 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters revokes openvpn client certificate Failure/Error: apply_manifest_on(hosts_as('vpnserver'), pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'vpnserver' exited with 4 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_104830017.pp.yFY3GR Last 10 lines of output were: Warning: /Stage[main]/Main/Openvpn::Client[vpnclientb]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/key]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/key]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclientb]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/key_close_tag]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/key_close_tag]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclientb]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/cert_open_tag]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/cert_open_tag]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclientb]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/cert]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/cert]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Client[vpnclientb]/Concat::Fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/cert_close_tag]/Concat_fragment[/etc/openvpn/test_openvpn_server/download-configs/vpnclientb.ovpn/cert_close_tag]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Revoke[vpnclientb]/Exec[revoke certificate for vpnclientb in context of test_openvpn_server]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Revoke[vpnclientb]/File[/etc/openvpn/test_openvpn_server/easy-rsa/revoked/vpnclientb]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Revoke[vpnclientb]/Exec[renew crl.pem on test_openvpn_server because of revocation of vpnclientb]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Openvpn::Revoke[vpnclientb]/Exec[copy renewed crl.pem to vpnclientb keys directory because of revocation of vpnclientb]: Skipping because of failed dependencies �[mNotice: Applied catalog in 0.87 seconds
pp = %(
openvpn::server { 'test_openvpn_server':
country => 'CO',
Expand Down Expand Up @@ -118,7 +118,7 @@
end

describe file("#{server_directory}/test_openvpn_server/easy-rsa/revoked/vpnclientb"), :revokedFile do
it { is_expected.to be_file }

Check failure on line 121 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters File "/etc/openvpn/test_openvpn_server/easy-rsa/revoked/vpnclientb" is expected to be file Failure/Error: it { is_expected.to be_file } expected `File "/etc/openvpn/test_openvpn_server/easy-rsa/revoked/vpnclientb".file?` to be truthy, got false
end

describe file("#{server_directory}/test_openvpn_server/easy-rsa/keys") do
Expand All @@ -136,20 +136,20 @@
end

describe file(server_crt.to_s), :crtFile do
it { is_expected.to be_file }

Check failure on line 139 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters File "/etc/openvpn/test_openvpn_server/easy-rsa/keys/issued/server.crt" is expected to be file Failure/Error: it { is_expected.to be_file } expected `File "/etc/openvpn/test_openvpn_server/easy-rsa/keys/issued/server.crt".file?` to be truthy, got false
it { is_expected.to contain 'Issuer: C=CO, ST=ST, L=A city, O=FOO, ' }

Check failure on line 140 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters File "/etc/openvpn/test_openvpn_server/easy-rsa/keys/issued/server.crt" is expected to contain "Issuer: C=CO, ST=ST, L=A city, O=FOO, " Failure/Error: it { is_expected.to contain 'Issuer: C=CO, ST=ST, L=A city, O=FOO, ' } expected File "/etc/openvpn/test_openvpn_server/easy-rsa/keys/issued/server.crt" to contain "Issuer: C=CO, ST=ST, L=A city, O=FOO, "
end

describe process('openvpn') do
it { is_expected.to be_running }

Check failure on line 144 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters Process "openvpn" is expected to be running Failure/Error: it { is_expected.to be_running } expected Process "openvpn" to be running
end

describe port(1194) do
it { is_expected.to be_listening.with('tcp') }

Check failure on line 148 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters Port "1194" is expected to be listening with tcp Failure/Error: it { is_expected.to be_listening.with('tcp') } expected Port "1194" to be listening with tcp
end

describe command('ip link show tun0') do
its(:stdout) { is_expected.to match %r{.* tun0: .*} }

Check failure on line 152 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters Command "ip link show tun0" stdout is expected to match /.* tun0: .*/ Failure/Error: its(:stdout) { is_expected.to match %r{.* tun0: .*} } expected "" to match /.* tun0: .*/ Diff: @@ -1 +1 @@ -/.* tun0: .*/ +""
its(:exit_status) { is_expected.to eq 0 }
end

Expand All @@ -172,7 +172,7 @@
its(:size) { is_expected.to be > 500 }
end

it 'permits to setup a vpn client' do

Check failure on line 175 in spec/acceptance/openvpn_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet 7 - Ubuntu 24.04

server defined type with basics parameters permits to setup a vpn client Failure/Error: scp_to(hosts_as('vpnclienta'), 'vpnclienta.tar.gz', '/tmp') IOError: No such file or directory - vpnclienta.tar.gz
scp_from(hosts_as('vpnserver'), "#{server_directory}/test_openvpn_server/download-configs/vpnclienta.tar.gz", '.')
scp_to(hosts_as('vpnclienta'), 'vpnclienta.tar.gz', '/tmp')
on(hosts_as('vpnclienta'), "tar xvfz /tmp/vpnclienta.tar.gz -C #{client_directory}")
Expand Down
10 changes: 5 additions & 5 deletions spec/defines/openvpn_ca_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

# Execs to working with certificates

if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04}
if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04|24.04}
it { is_expected.to contain_exec('generate dh param test_server').with_creates("#{server_directory}/test_server/easy-rsa/keys/dh.pem") }
else
it { is_expected.to contain_exec('generate dh param test_server').with_creates("#{server_directory}/test_server/easy-rsa/keys/dh2048.pem") }
Expand All @@ -126,7 +126,7 @@
it { is_expected.to contain_exec('create crl.pem on test_server') }
it { is_expected.not_to contain_exec('update crl.pem on test_server') }

if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04}
if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04|24.04}
it { is_expected.to contain_file("#{server_directory}/test_server/easy-rsa/vars").with_content(%r{^export EASYRSA_CA_EXPIRE=3650$}) }
it { is_expected.to contain_file("#{server_directory}/test_server/easy-rsa/vars").with_content(%r{^export EASYRSA_CERT_EXPIRE=3650$}) }
it { is_expected.not_to contain_file("#{server_directory}/test_server/easy-rsa/vars").with_content(%r{^export EASYRSA_REQ_CN"$}) }
Expand Down Expand Up @@ -161,7 +161,7 @@
}
end

if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04}
if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04|24.04}
it { is_expected.to contain_file("#{server_directory}/test_server/easy-rsa/vars").with_content(%r{^export EASYRSA_DN="cn_only"$}) }
it { is_expected.to contain_file("#{server_directory}/test_server/easy-rsa/vars").with_content(%r{^export EASYRSA_CA_EXPIRE=365$}) }
it { is_expected.to contain_file("#{server_directory}/test_server/easy-rsa/vars").with_content(%r{^export EASYRSA_CERT_EXPIRE=365$}) }
Expand All @@ -176,7 +176,7 @@
it { is_expected.to contain_file("#{server_directory}/test_server/easy-rsa/vars").with_content(%r{^export KEY_OU="NSA"$}) }
end

if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04}
if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04|24.04}
it { is_expected.to contain_exec('generate dh param test_server').with_creates("#{server_directory}/test_server/easy-rsa/keys/dh.pem") }
else
it { is_expected.to contain_exec('generate dh param test_server').with_creates("#{server_directory}/test_server/easy-rsa/keys/dh2048.pem") }
Expand All @@ -194,7 +194,7 @@
}
end

if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04}
if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04|24.04}
it {
is_expected.to contain_file("#{server_directory}/test_server/easy-rsa/openssl.cnf").with(
'ensure' => 'link',
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/openvpn_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

case facts[:os]['family']
when 'Ubuntu', 'Debian'
if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04}
if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04|24.04}
context 'system with easyrsa3' do
it {
is_expected.to contain_file("#{server_directory}/test_server/download-configs/test_client/keys/test_client/test_client.crt").with(
Expand Down Expand Up @@ -265,7 +265,7 @@

case facts[:os]['family']
when 'Ubuntu', 'Debian'
if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04}
if facts[:os]['release']['major'] =~ %r{10|11|20.04|22.04|24.04}
context 'system with easyrsa3' do
it {
is_expected.to contain_file("#{server_directory}/test_server/download-configs/test_client/keys/test_client/test_client.crt").with(
Expand Down
Loading