Playbook to get my current IP - Ansible and AWS

0 votes
How do I write a playbook that gives me my current IP?
Mar 24 in Ansible by Komal
22 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey Komal, that's pretty simple. Try this:

- name: Get my current IP address
  uri: 
    url: http://checkip.amazonaws.com/ 
    return_content: yes 
  register: my_ip 

answered Mar 24 by Aarohi
Yes, it works fine. Thank you @Aarohi

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do i set multiple authorized keys to my ansible playbook?

Try this: - name: Set up multiple authorized ...READ MORE

answered Feb 11 in Ansible by John
27 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Ansible with AWS Parameter store

Hey @Dipti, have a look at the ...READ MORE

answered Mar 24 in Ansible by Rhea
33 views
0 votes
1 answer

Create Network Load Balancer on AWS using Ansible

Hey @Neha, you can create NLB using ...READ MORE

answered Mar 24 in Ansible by Arc
17 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.