Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

request certificate: unexpected attributes

Hello ,

I'm trying to add some attributes to CSR with this reference : https://docs.puppet.com/puppet/latest/reference/config_file_csr_attributes.html

cat > /etc/puppetlabs/puppet/csr_attributes.yaml << YAML

extension_requests:

pp_instance_id: $(curl -s http://169.254.169.254/latest/meta-data/instance-id)

pp_image_name: $(curl -s http://169.254.169.254/latest/meta-data/ami-id)

1.3.6.1.4.1.34380.1.1.18: $(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/.$//') pp_role: ‘testagent’ YAML

after making this file , when i run "puppet agent -t" i get this error :

Info: csr_attributes file loading from /etc/puppetlabs/puppet/csr_attributes.yaml Error: Could not request certificate: unexpected attributes ["pp_instance_id", "pp_image_name", "1.3.6.1.4.1.34380.1.1.18", "pp_role"] in "/etc/puppetlabs/puppet/csr_attributes.yaml" Exiting; failed to retrieve certificate and waitforcert is disabled