Skip to content

Commit

Permalink
Add support for AIX (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharper authored Oct 25, 2022
1 parent cc62866 commit 2b5a767
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
13 changes: 10 additions & 3 deletions manifests/ca.pp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,20 @@
Boolean $verify_https_cert = true,
Optional[String] $checksum = undef,
Optional[String[1]] $checksum_type = undef,
Optional[String] $ca_file_group = undef,
Optional[String] $ca_file_mode = undef,
) {

include ::ca_cert::params
include ::ca_cert::update
require ::ca_cert::enable

if $ca_file_group == undef {
$file_group = $ca_cert::params::ca_file_group
} else {
$file_group = $ca_file_group
}

if $ca_file_mode == undef {
$file_mode = $ca_cert::params::ca_file_mode
} else {
Expand Down Expand Up @@ -103,7 +110,7 @@
source => $source,
path => $ca_cert,
owner => 'root',
group => 'root',
group => $file_group,
mode => $file_mode,
notify => Class['::ca_cert::update'],
}
Expand All @@ -125,7 +132,7 @@
source => $source_path,
path => $ca_cert,
owner => 'root',
group => 'root',
group => $file_group,
mode => $file_mode,
notify => Class['::ca_cert::update'],
}
Expand All @@ -136,7 +143,7 @@
content => $ca_text,
path => $ca_cert,
owner => 'root',
group => 'root',
group => $file_group,
mode => $file_mode,
notify => Class['::ca_cert::update'],
}
Expand Down
14 changes: 14 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
$trusted_cert_dir = '/usr/local/share/ca-certificates'
$update_cmd = 'update-ca-certificates'
$cert_dir_group = 'staff'
$ca_file_group = 'root'
$ca_file_mode = '0444'
$ca_file_extension = 'crt'
$package_name = 'ca-certificates'
Expand All @@ -26,6 +27,7 @@
$update_cmd = 'update-ca-trust extract'
$cert_dir_group = 'root'
$cert_dir_mode = '0755'
$ca_file_group = 'root'
$ca_file_mode = '0644'
$ca_file_extension = 'crt'
$package_name = 'ca-certificates'
Expand All @@ -36,6 +38,7 @@
$update_cmd = 'trust extract-compat'
$cert_dir_group = 'root'
$cert_dir_mode = '0755'
$ca_file_group = 'root'
$ca_file_mode = '0644'
$ca_file_extension = 'crt'
$package_name = 'ca-certificates'
Expand All @@ -56,8 +59,19 @@
}
$cert_dir_group = 'root'
$cert_dir_mode = '0755'
$ca_file_group = 'root'
$ca_file_mode = '0644'
}
'AIX': {
$trusted_cert_dir = '/var/ssl/certs'
$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'
}
default: {
fail("Unsupported osfamily (${::osfamily})")
}
Expand Down

0 comments on commit 2b5a767

Please sign in to comment.