Created
June 3, 2015 10:13
-
-
Save worldofchris/d3079e1adfbcbd2aaba4 to your computer and use it in GitHub Desktop.
Get my IP address from icanhazip.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
gather_facts: False | |
sudo: no | |
tasks: | |
- name: Get my IP address | |
uri: url=http://icanhazip.com return_content=yes | |
register: ip_response | |
- name: Set my IP address | |
set_fact: my_ip="{{ ip_response.content|replace("\n", "/32") }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment