PuppetCertExpireDate - command openssl x509 -in /etc/puppetlabs/puppet/ssl/ca/ca_crt.pem -enddate -noout

The PuppetCertExpireDate parser reads the output of openssl x509 -in /etc/puppetlabs/puppet/ssl/ca/ca_crt.pem -enddate -noout.

Sample output of openssl x509 -in /etc/puppetlabs/puppet/ssl/ca/ca_crt.pem -enddate -noout:

notAfter=Dec  4 07:04:05 2035 GMT

Examples:

>>> type(date_info)
<class 'insights.parsers.puppet_ca_cert_expire_date.PuppetCertExpireDate'>
>>> date_info['notAfter'].datetime
datetime.datetime(2035, 12, 4, 7, 4, 5)
class insights.parsers.puppet_ca_cert_expire_date.PuppetCertExpireDate(context)[source]

Bases: insights.parsers.ssl_certificate.CertificateInfo

Note

Please refer to its super-class insights.parsers.ssl_certificate.CertificateInfo for more details.

Warning

The attribute expire_date is deprecated, please get the value from the dictionary directly instead.

Read the openssl x509 -in /etc/puppetlabs/puppet/ssl/ca/ca_crt.pem -enddate -noout and set the date to property expire_date.

expire_date

The date when the puppet ca cert will be expired

Type

datetime

Raises

SkipException -- when notAfter isn’t in the output

parse_content(content)[source]

This uses the insights.parsers.ssl_certificate.parse_openssl_output() function. See its documentation for parsing details.