0

I'm trying to get Ansible EC2 to provision instances that require IMDSV2.

Through the aws ec2 run-instances I'm able to do it by adding --metadata-options "HttpEndpoint=enabled,HttpTokens=required" to my command.

I'm not seeing a matching option in the Ansible EC2 module?

I'm sure I'm missing something basic.

Charlie
  • 103
  • 3

1 Answers1

1

You're not missing anything, Ansible's AWS modules often fail to support new features in a timely manner due to a combination of technical debt and lack of active developers.

In this case support for metadata options was added five days ago in this commit.

Since this is not yet included in any release you would need to install the development version of this collection in order to use this feature.

flowerysong
  • 901
  • 4
  • 6
  • Any chance you happen to know how to get the development version of collections? :D – Charlie Aug 24 '21 at 23:03
  • https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#installing-a-collection-from-a-git-repository (assuming you're using a version of Ansible that supports collections and are willing to run prerelease code.) – flowerysong Aug 24 '21 at 23:45