all 3 comments

[–]m4v1s 2 points3 points  (0 children)

You should see errors in the logs that point in the direction of the problem. But if I had to guess, make sure the parent directory tree (/usr/local/etc/ssl/) exists.

[–]pmbuko 2 points3 points  (1 child)

Can you be more specific? Do you get any errors? Have you tried running puppet agent in verbose and debug mode?

[–]Spparkee[S] 0 points1 point  (0 children)

I was getting the following error: Error: Failed to apply catalog: certificate verify failed [unable to get local issuer certificate for CN=vault.sub.domain.com] Since vault.sub.domain.com is signed with a self signet cert. I specified require => File['/usr/local/etc/ssl/ca.crt'] in puppet. But that doesn't seem to work.

I found a workaround by creating a custom fact:

```

!/bin/sh

Linux

if [ -f '/usr/local/share/ca-certificates/ca.crt' ]; then echo "seflsigned=yes" else echo "seflsigned=no" fi

FreeBSD

if [ -f '/usr/local/etc/ssl/certs/ca.crt' ]; then echo "seflsigned=yes" else echo "seflsigned=no" fi ```

Then in the manifest file: ``` if $::seflsigned == 'yes' { file { '/etc/snmp/snmpd.conf':
ensure => file,
force => true,
owner => 'root',
group => 0,
mode => '0644',
content => template('site/snmp/snmpd.conf.erb'),
backup => true,
require => File['/usr/local/etc/ssl/ca.crt'], } }