-
Notifications
You must be signed in to change notification settings - Fork 0
/
play.yml
100 lines (82 loc) · 2.26 KB
/
play.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
- hosts: localhost
tasks:
- name: Basic example using example1
json_file:
filepath: example1.json
jsonpath: Students
search: Major=Chemistry
value: Name
register: result1a
- debug: var=result1a
- name: Basic example using example1
json_file:
filepath: example1.json
jsonpath: Students
search: Major=Physics
value: Name
register: result1b
- debug: var=result1b
- name: Basic example using example1
json_file:
filepath: example1.json
jsonpath: Students
search: Name=Rajeev Sen
value: Major
register: result1c
- debug: var=result1c
- name: Basic example using example1
json_file:
filepath: example1.json
jsonpath: Students
search: Name=Rajeev Sen
value: Major=Computer Science
register: result1d
- debug: var=result1d
- name: Resetting example1d
json_file:
filepath: example1.json
jsonpath: Students
search: Name=Rajeev Sen
value: Major=Mathematics
register: result1e
- debug: var=result1e
- name: Intermediate example using example2
json_file:
filepath: example2.json
jsonpath: list,weather
search: dt=1446940800,id=501
value: main
register: result2a
- debug: var=result2a
- name: Intermediate example using example2
json_file:
filepath: example2.json
jsonpath: list,weather
search: dt=1446940800,id=501
value: description
register: result2b
- debug: var=result2b
- name: Intermediate example using example2
json_file:
filepath: example2.json
jsonpath: list,weather
search: dt=1446940800,id=501
value: description=light hail
register: result2c
- debug: var=result2c
- name: Resetting example 2c
json_file:
filepath: example2.json
jsonpath: list,weather
search: dt=1446940800,id=501
value: description=light rain
register: result2d
- debug: var=result2d
# - name: Downloading a JSON file
# uri:
# url: http://mysafeinfo.com/api/data?list=englishmonarchs&format=json
# method: GET
# body_format: json
# register: result_download
#
# - debug: var=result_download