Hello all, 
Currently i was working on migration from IMDS v1 to IMDS v2 in AWS and got 
the below error. 

FAILED! => {"changed": false, "msg": "Failed to retrieve metadata from AWS: 
HTTP Error 401: Unauthorized", "response": {"body": "<?xml version=\"1.0\" 
encoding=\"iso-8859-1\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 
Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\";>\n<html
 
xmlns=\"http://www.w3.org/1999/xhtml\"; xml:lang=\"en\" lang=\"en\">\n 
<head>\n  <title>401 - Unauthorized</title>\n </head>\n <body>\n  <h1>401 - 
Unauthorized</h1>\n </body>\n</html>\n", "connection": "close", 
"content-length": "343", "content-type": "text/html", "date": "Mon, 25 Jul 
2022 23:26:11 GMT", "msg": "HTTP Error 401: Unauthorized", "server": 
"EC2ws", "status": 401, "url": "http://169.254.169.254/latest/meta-data/"}}

*My ansible version on this Instance is : (ansible --version)*

ansible 2.9.15
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.17 (default, Jul  1 2022, 15:56:32) [GCC 7.5.0]

Can someone please in this as stuck on this.
Thanks in advance. 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d6328c61-380e-4c9d-b043-2203d81385a5n%40googlegroups.com.

Reply via email to