From b36c294244b5d3d916d48ee31acdb838eae97619 Mon Sep 17 00:00:00 2001 From: Hugo Haakseth Date: Sat, 25 May 2024 00:44:32 +0200 Subject: [PATCH] Remove param defaults for OSes that we are not able to verify --- REFERENCE.md | 3 --- manifests/init.pp | 3 --- manifests/params.pp | 33 ++------------------------------- metadata.json | 7 ------- spec/classes/ca_cert_spec.rb | 12 ------------ spec/classes/params_spec.rb | 12 ------------ 6 files changed, 2 insertions(+), 68 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 14a9484..1a88610 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -98,8 +98,6 @@ Data type: `String[1]` The installed trusted certificate's POSIX group permissions. This uses the same syntax as Puppet's native file resource's "group" parameter. -It defaults to 'system' on AIX, to 'sys' on Solaris, to 'staff' on -Ubuntu/Debian, and to 'root' in other cases. Default value: `$ca_cert::params::cert_dir_group` @@ -119,7 +117,6 @@ Data type: `String[1]` The installed CA certificate's POSIX group permissions. This uses the same syntax as Puppet's native file resource's "group" parameter. -(defaults to 'root' with the exeption of AIX which defaults to 'system') Default value: `$ca_cert::params::ca_file_group` diff --git a/manifests/init.pp b/manifests/init.pp index 78ca931..9c42fc1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -25,8 +25,6 @@ # @param cert_dir_group # The installed trusted certificate's POSIX group permissions. This uses # the same syntax as Puppet's native file resource's "group" parameter. -# It defaults to 'system' on AIX, to 'sys' on Solaris, to 'staff' on -# Ubuntu/Debian, and to 'root' in other cases. # # @param cert_dir_mode # The installed trusted certificate's POSIX filesystem permissions. This uses @@ -36,7 +34,6 @@ # @param ca_file_group # The installed CA certificate's POSIX group permissions. This uses # the same syntax as Puppet's native file resource's "group" parameter. -# (defaults to 'root' with the exeption of AIX which defaults to 'system') # # @param ca_file_mode # The installed CA certificate's POSIX filesystem permissions. This uses diff --git a/manifests/params.pp b/manifests/params.pp index d925df8..316f89f 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -22,7 +22,7 @@ $cert_dir_mode = '2665' } default: { - fail("Unsupported operatingsystem (${facts['os']['name']})") + $cert_dir_mode = '0755' } } } @@ -68,35 +68,6 @@ $ca_file_group = 'root' $ca_file_mode = '0644' } - 'AIX': { - $trusted_cert_dir = '/var/ssl/certs' - $distrusted_cert_dir = undef - $update_cmd = '/usr/bin/c_rehash' - $cert_dir_group = 'system' - $cert_dir_mode = '0755' - $ca_file_group = 'system' - $ca_file_mode = '0644' - $ca_file_extension = 'crt' - $package_name = 'ca-certificates' - } - 'Solaris': { - if versioncmp($facts['os']['release']['major'], '11') >= 0 { - $trusted_cert_dir = '/etc/certs/CA/' - $distrusted_cert_dir = undef - $update_cmd = '/usr/sbin/svcadm restart /system/ca-certificates' - $cert_dir_group = 'sys' - $cert_dir_mode = '0755' - $ca_file_group = 'root' - $ca_file_mode = '0444' - $ca_file_extension = 'pem' - $package_name = 'ca-certificates' - } - else { - fail("Unsupported OS Major release (${facts['os']['release']['major']})") - } - } - default: { - fail("Unsupported osfamily (${facts['os']['family']})") - } + default: {} } } diff --git a/metadata.json b/metadata.json index 37a5be3..5344a79 100644 --- a/metadata.json +++ b/metadata.json @@ -67,13 +67,6 @@ }, { "operatingsystem": "Archlinux" - }, - { - "operatingsystem": "AIX", - "operatingsystemrelease": [ - "7.2", - "7.3" - ] } ], "requirements": [ diff --git a/spec/classes/ca_cert_spec.rb b/spec/classes/ca_cert_spec.rb index 8dbb6ee..81f7fe4 100644 --- a/spec/classes/ca_cert_spec.rb +++ b/spec/classes/ca_cert_spec.rb @@ -102,16 +102,4 @@ end end end - - context 'on an unsupported operating system' do - let :facts do - { - 'os' => { - 'family' => 'WeirdOS', - }, - } - end - - it { expect { catalogue }.to raise_error Puppet::Error, %r{Unsupported osfamily} } - end end diff --git a/spec/classes/params_spec.rb b/spec/classes/params_spec.rb index 18c53c7..fc077c5 100644 --- a/spec/classes/params_spec.rb +++ b/spec/classes/params_spec.rb @@ -47,16 +47,4 @@ end end end - - context 'on an unsupported operating system' do - let :facts do - { - 'os' => { - 'family' => 'WeirdOS', - }, - } - end - - it { expect { catalogue }.to raise_error Puppet::Error, %r{Unsupported osfamily} } - end end