puppetlabs / puppetserver-ca-cli

A simple Ruby CLI tool to interact with the Puppet Server's included Certificate Authority
Apache License 2.0
3 stars 24 forks source link

(PE-34952) Add inventory library #106

Closed nmburgan closed 1 year ago

nmburgan commented 1 year ago

This adds a module for parsing the inventory.txt file. This will handle any errors found in the file, and return a hash with certname as the key and the rest of the info has another hash. Because the inventory will likely have old entries for a given certname, this records the serials for the old certnames, but the serial value will be the latest cert found.

Also fixes a couple issues found, mostly around spec files not getting cleaned up due to the way some of the tests were written.

shaigy commented 1 year ago

I don't think this is needed for my current PR, but can use for checking expired entries for the next ticket. LGTM