Skip to content

Commit

Permalink
Remove param defaults for OSes that we are not able to verify
Browse files Browse the repository at this point in the history
  • Loading branch information
h-haaks committed May 25, 2024
1 parent 9297cd8 commit d2617cf
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 68 deletions.
3 changes: 0 additions & 3 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand All @@ -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`

Expand Down
3 changes: 0 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
33 changes: 2 additions & 31 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$cert_dir_mode = '2665'
}
default: {
fail("Unsupported operatingsystem (${facts['os']['name']})")
$cert_dir_mode = '0755'
}
}
}
Expand Down Expand Up @@ -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: {}
}
}
7 changes: 0 additions & 7 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@
},
{
"operatingsystem": "Archlinux"
},
{
"operatingsystem": "AIX",
"operatingsystemrelease": [
"7.2",
"7.3"
]
}
],
"requirements": [
Expand Down
12 changes: 0 additions & 12 deletions spec/classes/ca_cert_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 0 additions & 12 deletions spec/classes/params_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d2617cf

Please sign in to comment.