jessereynolds/puppet_certificate_extensions_facts

extensions with friendly pp_ names are not included as facts on a puppet agent run

jessereynolds opened this issue · 1 comments

With puppet agent 4.4.1 (PE 2016.1.1 agent installation) extensions that have a corresponding pp_ friendly names (eg 1.3.6.1.4.1.34380.1.1 => pp_instance_id ) do not have facts created for them during a puppet agent run. They do have facts created when running facter -p or puppet facts, however.

It turns out that when the custom fact is called during a puppet agent run, the certificate's extensions oids are already converted to their friendly name, and I was only looking for oids beginning with 1.3.6.1.4.1.34380.1.1.

Fixed now:

# puppet agent --debug | grep 'i-'
Debug: Facter: fact "pp_instance_id" has resolved to "i-8da75c11".

# facter -p | grep 'i-'
certificate_extension_1_3_6_1_4_1_34380_1_1_2 => i-8da75c11
pp_instance_id => i-8da75c11

# puppet facts | grep 'i-'
    "certificate_extension_1_3_6_1_4_1_34380_1_1_2": "i-8da75c11",
    "pp_instance_id": "i-8da75c11",