GENIExperimenter/Tutorials/GENI-SAVI/Execute: gee-tutorial.yaml

File gee-tutorial.yaml, 1.4 KB (added by acb@cs.princeton.edu, 9 years ago)

Ansible playbook skeleton for fetching the parameterized URL

Line 
1---
2- hosts: nodes
3  remote_user: root
4  tasks:
5
6  ### (a): Get the container's FQDN ###
7  - name: Dump container FQDN
8    debug: # INSERT ARGUMENTS HERE
9
10
11  ### (b):  Get the container IP address ###
12  - name: Dump container IP address
13    debug: # INSERT ARGUMENTS HERE
14
15
16  ### (c): Get the control host name ###
17  - name: Dump control host name
18    debug: # INSERT ARGUMENTS HERE
19
20
21  ### (d): Get the host's public IP address ###
22  - name: Get my public IP using 'dig +short'
23    shell: # INSERT ARGUMENTS HERE
24    register: public_ip
25
26  - name: Dump public_ip variable
27    debug: var=public_ip
28
29
30  ### (e): Get the latitude and longitude for each node ###
31  - name: Download GeoLiteCity DB
32    get_url: # INSERT ARGUMENTS HERE
33
34  - name: Unzip GeoLiteCity.dat.gz
35    shell: gunzip -f GeoLiteCity.dat.gz
36
37  - name: Run geoiplookup to get latitude
38    shell: # INSERT ARGUMENTS HERE
39    register: latitude
40
41  - name: Dump latitude variable
42    debug: var=latitude
43
44  - name: Run geoiplookup to get longitude
45    shell: # INSERT ARGUMENTS HERE
46    register: longitude
47
48  - name: Dump longitude variable
49    debug: var=longitude
50
51
52  ### (f): Fetch the parameterized URL ###
53  - name: Dump the full URL, to make sure it looks OK
54    debug: msg="http://www.lively-web.org/nodejs/GEETutorial/helloWorld?slice=# INSERT ARGUMENTS HERE"
55
56  - name: Fetch the full URL
57    shell: curl "http://www.lively-web.org/nodejs/GEETutorial/helloWorld?slice=# INSERT ARGUMENTS HERE"