puppetlabs-aws
puppetlabs-aws copied to clipboard
Error: Facter: error while resolving custom fact "ec2_tags": undefined method `[]' for nil:NilClass
I'm getting the error when i use the module locally on my laptop installed on a PE2016.2 master configured with my AWS environment:
Error: Facter: error while resolving custom fact "ec2_tags": undefined method `[]' for nil:NilClass
@Andulla not sure if this is exactly related to the module. Can you share the code you are using for your custom fact ? Have you made sure the aws-sdk-core and retries gems are installed in the correct dir on your PE master ? Here is a good example custom fact out there for this : https://github.com/mrzarquon/puppet-ec2tags/blob/master/lib/facter/ec2tags.rb
If you plan on running this on Windows(just in case) theres an SSL issue with the ruby SDK that will require you to add this : Aws.use_bundled_cert!
Happy to Help you out!
@Andulla, did the advice above resolve this for you? If so, I'm planning to close this issue.
Last time in worked on this i simply disabled the ec2tag that did come with the AWS module. That was the quickest solution for me. Never tested it again so far.
confine do Facter.value(:ec2_metadata)['iam']['info'] end
this should be changed to confine do Facter.value(:ec2_metadata) end
if its from the module the other guy links to then it dont give the error on non aws systems