diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ac5f4a3..c639e6b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/data/family/Debian/24.04.yaml b/data/family/Debian/24.04.yaml new file mode 100644 index 00000000..e793d021 --- /dev/null +++ b/data/family/Debian/24.04.yaml @@ -0,0 +1,2 @@ +--- +openvpn::default_easyrsa_ver: '3.0' diff --git a/lib/facter/easyrsa.rb b/lib/facter/easyrsa.rb index 744235b2..31637355 100644 --- a/lib/facter/easyrsa.rb +++ b/lib/facter/easyrsa.rb @@ -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 diff --git a/metadata.json b/metadata.json index d75dde4d..2e276678 100644 --- a/metadata.json +++ b/metadata.json @@ -13,7 +13,8 @@ "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "20.04", - "22.04" + "22.04", + "24.04" ] }, { diff --git a/spec/acceptance/openvpn_spec.rb b/spec/acceptance/openvpn_spec.rb index 4c0ba2fd..3e529a8b 100644 --- a/spec/acceptance/openvpn_spec.rb +++ b/spec/acceptance/openvpn_spec.rb @@ -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" diff --git a/spec/defines/openvpn_ca_spec.rb b/spec/defines/openvpn_ca_spec.rb index a578c3c1..d5c5ee88 100644 --- a/spec/defines/openvpn_ca_spec.rb +++ b/spec/defines/openvpn_ca_spec.rb @@ -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") } @@ -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"$}) } @@ -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$}) } @@ -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") } @@ -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', diff --git a/spec/defines/openvpn_client_spec.rb b/spec/defines/openvpn_client_spec.rb index 99e6d731..f66938cc 100644 --- a/spec/defines/openvpn_client_spec.rb +++ b/spec/defines/openvpn_client_spec.rb @@ -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( @@ -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(