Skip to content

Commit

Permalink
Fix the force_enable parameter
Browse files Browse the repository at this point in the history
Relates to #54 and #45
  • Loading branch information
pcfens committed Mar 26, 2019
1 parent 810955f commit ddbb046
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# The package contains the system default (typically Mozilla) CA
# certificates, as well as the tools required for managing other installed
# CA certificates.
# [*force_enable*]
# Use the force-enable option on RH 7 and earlier (and derivatives)
# [*ca_certs*]
# A hash of CA certificates that should be installed as part of the class
# declaration
Expand All @@ -40,6 +42,7 @@
Boolean $always_update_certs = false,
Boolean $purge_unmanaged_CAs = false,
Boolean $install_package = true,
Boolean $force_enable = false,
Hash $ca_certs = {},
String $package_ensure = present,
String $package_name = $ca_cert::params::package_name,
Expand Down
6 changes: 2 additions & 4 deletions manifests/update.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Private class
class ca_cert::update (
Boolean $force_enable = false,
) {
class ca_cert::update {
include ::ca_cert::params

if ($::osfamily == 'RedHat' and versioncmp($::operatingsystemrelease, '7') < 0) {
if $force_enable {
if $ca_cert::force_enable {
exec { 'enable_ca_trust':
command => 'update-ca-trust force-enable',
logoutput => 'on_failure',
Expand Down

0 comments on commit ddbb046

Please sign in to comment.