dvonessen / puppet_getssl

Puppet module to get Letsencrypt certificates with getssl Bash script by srvrco
3 stars 5 forks source link

params fro redhat systems #12

Open aqueos opened 6 years ago

aqueos commented 6 years ago

hi,

for getssl to work on redhat i had to change this: ` GUEST:root@puppet2018:[/etc/puppetlabs/code/environments/production/modules/backuppc/files/ssh]: difff -r /etc/puppetlabs/code/environments/production/modules/getssl /etc/puppetlabs/code/environments/production/modules/getssl.old diff '--width=230' --suppress-common-lines -w -B -b -y -r /etc/puppetlabs/code/environments/production/modules/getssl/manifests/params.pp /etc/puppetlabs/code/environments/production/modules/getssl.old/manifests/params.pp

   case $::osfamily {
      'Debian': {
                $ssl_conf           = '/usr/lib/ssl/openssl.cnf'
      }
      'Ubuntu': {
                $ssl_conf           = '/usr/lib/ssl/openssl.cnf'
      }
      'RedHat': {
                $ssl_conf           = '/etc/pki/tls/openssl.cnf'
      }
      default: {
         fail("The ${module_name} module is not supported on an ${::osfamily} based system.")
      }
   }

$ssl_conf = '/usr/lib/ssl/openssl.cnf' | # $ssl_conf = '/usr/lib/ssl/openssl.cnf' `

i used a fail failure on unknow systems but that can also be changed to only override on redhats.

class getssl::params{ case $::osfamily { 'Debian': { $ssl_conf = '/usr/lib/ssl/openssl.cnf' } 'Ubuntu': { $ssl_conf = '/usr/lib/ssl/openssl.cnf' } 'RedHat': { $ssl_conf = '/etc/pki/tls/openssl.cnf' } default: { fail("The ${module_name} module is not supported on an ${::osfamily} based system.") } }

Ghislain.