Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
```
tasks:
- name: Display the JSON file and collect data
shell: cat {{ cve_json_file }}
register: result
- name: Save the Json data to a Variable
set_fact:
jsondata: "{{ result.stdout | from_json }}"
- name: setDomainName
set_fact:
domain_name: "{{ jsondata | json_query(jmesquery) }}"
vars:
jmesquery: 'domain.name'
- name: Server Names
set_fact:
servernames: "{{ jsondata | json_query(jmesquery) }}"
vars:
jmesquery: '*.servers[*].name'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.