Ansible parse json file

This method is very simple to implement. This tutorial demonstrates how to classify structured data (e.g. tabular data in a CSV). We will use Keras to define the model, and tf.feature_column as a bridge to map from columns in a CSV to features used to train the model. This tutorial contains complete code to: Load a CSV file using Pandas.09‏/09‏/2017 ... Finally, you realized that Ansible not reads your variable name well and makes problem while working. After that problem, you used Google ... florenfile premium key ansible-playbook -l web1 playbook.yml --tags=nginx-vhost-config which is working fine, it will create from template a nginx vhost configuration file on the remote server as domain1.com.conf and so on for all the found definitions.Search bar contains a textfield, clear button and cancel button. To pin the search bar with navigation bar all you need to do in iOS 11 is just one line code. var search = UISearchController (searchResultsController: nil) // Declare the searchController self.navigationItem.searchController = search // Write this line in viewDidLoad function.Name is added in the json files. Can you please check the json and playbook files and help and sorting this issue. ... ('ansible.builtin.file','create_body_4.json') | to_json }}" create_body.json ... It seems like "create_body.json" file is not in correct format hence "name" is not parsed properly. 0 Kudos Reply. Subscribe. All forum topics ... our love natalie cole chords YAML is a natural superset of JSON, this means that you can actually use a JSON structure as a valid YAML variable. I wouldn't do it, though, because I find it odd to mix two languages in YAML files, but if you personnaly see no objection to it, this playbook, that doesn't even use the to_json filter, is also a working one: frigidaire freezer green light not on To do it with ANSIBLE: Use host prompt to choose the envid in the 1. curl file like this: name: Get json file shell: curl --output file.json -k -O https://example.tp.com/services/getMasterExtract.php?env_id= { {envid}}&product=all&du=all&format=json&resolved=true args: chdir: /tmp/ 2. Extract the Value:1 Answer Sorted by: 0 You refer variables as if they are at the top level, whereas they are under Tomcat key. Use hosts: " { {Tomcat.Server}}" or reformat your json file to eliminate Tomcat level. Share Improve this answer Follow answered Jun 5, 2017 at 9:37 Konstantin Suvorov 62k 8 151 181 Add a comment Your Answer red deer swap meet 2022Here is an example of using the register parameter with the find module. - find: paths: /tmp register: out. betrcode / ansible - parse - json -and-loop Public Notifications Fork 2 Star 2 2 stars 2 forks Star Notifications Code Issues 0 Pull requests 0 Actions Projects 0 Wiki Security Insights This commit does not belong to any branch on this ... From the full JSON I just need the values: "name": "vmh20.lab.test" "name": "vmh19.lab.test". This output can give any number of hosts in the cluster depending in the cluster size. I want to use those values as entry for hostname at the task: - name: Modify root local user to ESXi vmware_local_user_manager: hostname: ' { { item.results.json ... hounslow rent house YAML is a natural superset of JSON, this means that you can actually use a JSON structure as a valid YAML variable. I wouldn't do it, though, because I find it odd to mix two languages in YAML files, but if you personnaly see no objection to it, this playbook, that doesn't even use the to_json filter, is also a working one:How to parse json in Ansible? I haven't been able to figure this out yet, is there a way in Ansible to parse json responses from URI calls? Eg: If I were to query an elastic search stack for their license status, I'd like to know if the type is basic, gold, premium or something else. Eg json: "license" : { "status" : "active", Includes support for creating and deleting both objects and buckets, retrieving objects as files or strings, generating download links and copy of an object that is already stored in Amazon S3. where is the asian carp originally from powerapps default selected dropdown taller younger sister lift me May 26, 2021 · After signing up or signing in ...Includes support for creating and deleting both objects and buckets, retrieving objects as files or strings, generating download links and copy of an object that is already stored in Amazon S3. where is the asian carp originally from powerapps default selected dropdown taller younger sister lift me May 26, 2021 · After signing up or signing in ...28‏/03‏/2021 ... Par exemple si vous utilisez Ansible pour manager des clusters ... name: Parse json hosts: localhost gather_facts: no tasks: - name: ... recent murders in kentucky 17‏/03‏/2019 ... Hi again after longtime, today we will learn how to read variable from json/yaml file via ansible. In our automation stuff, sometime we may ...The json_query filter lets you query a complex JSON structure and iterate over it using a loop structure. Note You must manually install the jmespath dependency on the Ansible controller before using this filter. This filter is built upon jmespath, and you can use the same syntax. For examples, see jmespath examples. Consider this data structure:I'm a newbie on Ansible network automation. I would like to try to create a network inventories to collect some of the information for a bunch of network devices. And ideally store each device information into a single csv. e.g. of the csv would look like this: ansible_net_hostname, ansible_net_image, ansible_versionTo go two levels down, for example, you need to follow the hierarchy of the key names to that point, which translates to input.parsed.interfaces, in this case. input is the variable that stores the JSON data, parsed the top-level key, and interfaces is the subsequent one. In a playbook, this will looks like: - name: Go down the JSON file 2 levels hostage situation examples Here is an example of using the register parameter with the find module. - find: paths: /tmp register: out. betrcode / ansible - parse - json -and-loop Public Notifications Fork 2 Star 2 2 stars 2 forks Star Notifications Code Issues 0 Pull requests 0 Actions Projects 0 Wiki Security Insights This commit does not belong to any branch on this ... konka tv remote manual Code Revisions 3 Stars 12 Forks 1. Download ZIP. Parsing JSON with Ansible... Raw. gistfile1.md. Recently, Everyday Hero has been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API. A useful filter we have been using in Ansible is taking output from. Parsing JSON with Ansible …. I have been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API. A useful filter I have been using in Ansible is taking output from a shell action and turning it into something one can consume via variables. This example ... glamping land for sale JSON parsing examples. This repo will grow overtime and give examples of parsing JSON to be able to get to the bit of information you want. BOth examples five you the same output, but …13‏/05‏/2022 ... Strip what's outside the braces {} and Ansible will parse the dictionary subnet: "{{ result.json[2:-3] }}". gives modesto bee obits To install it, use: ansible-galaxy collection install community.general . To use it in a playbook, specify: community.general.office_365_connector_card. Jump start your automation project with great content from the Ansible community. Jump start your automation project with great content from the Ansible community. Toggle navigation. About ...Formatting data: YAML and JSON You can switch a data structure in a template from or to JSON or YAML format, with options for formatting, indenting, and loading data. The basic filters are occasionally useful for debugging: { { some_variable | to_json }} { { some_variable | to_yaml }} For human readable output, you can use:This query will return the current date & time of your local machine. In my case, the result is: ... dd-mm-yyyy: 106: dd mon yyyy: 107: Mon dd, yyyy: 109: Mon dd yyyy: 110: mm-dd-yyyy: 111: yyyy/mm/dd: The 108 is missing because it will return the time.This is all.Choose the right format for you and you're ready to go. Share this blog post. Top GREPCC Earners Today.As the name suggests, the Ansible json_query filter is helping you to query the JSON document and get the elements in the JSON tree structure. json_query is using the jmespath Query language. It is a powerful query language to parse JSON content. It helps you to parse JSON content and filter the elements you want.This then allows us to do the following and ec2_output is now in a JSON format that Ansible can then use to iterate over like so: This Ansible task creates a file that contains all of the...May 09, 2018 · 1. i gave it a shot using j2 syntax in the variable name part, and - TIL - looks like the jinja2 syntax is allowed in that part as well! please see playbook to process the hooks list variable and assign to variables variable_1, variable_2, variable_3 and so on: - hosts: localhost gather_facts: false vars: counter: 1 hooks: - 192.30.252.0/22 ... discreet shipping disposable vapes Code Revisions 3 Stars 12 Forks 1. Download ZIP. Parsing JSON with Ansible... Raw. gistfile1.md. Recently, Everyday Hero has been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API. A useful filter we have been using in Ansible is taking output from.Python YAML Load – Read YAML File. We can read the YAML file using the PyYAML module’s yaml.load function. This function parse and converts a YAML object to a Python dictionary ( dict object). This process is known as Deserializing YAML into a Python. This function accepts either a byte string, a Unicode string, an open binary file. weedmaps analytics Nov 28, 2016 · To do it with ANSIBLE: Use host prompt to choose the envid in the 1. curl file like this: name: Get json file shell: curl --output file.json -k -O https://example.tp.com/services/getMasterExtract.php?env_id={{envid}}&product=all&du=all&format=json&resolved=true args: chdir: /tmp/ Ansible organizes these tasks in playbook files, which run on one or more remote target hosts.Inventory files maintain lists of these hosts and are formatted as YAML or INI. 2. Ansible vault view encrypted files. As you see now we cannot see the content of our encrypted file. So to view the encrypted file27‏/10‏/2022 ... How to automate the reading of example.json file on Ansible host, assign to a variable and use in your Ansible Playbook ...One of the most basic needs when using Ansible is the Ansible inventory. For years the mainstay has been the INI, YAML, or JSON-based flat file neatly located in /etc/ansible/inventory by default. Press Clone or download and press Use SSH in the panel that appears. The panel will change to Clone with SSH with the updated link. Copy the link by ... ita airways seat map 2020. 6. 3. · Ansible loop . Posted by supremeb on Jun 3rd, 2020 at 9:16 AM. Needs answer. General Linux. Hi, Im trying take snapshots for some of my VM instances using ansible, it works fine if i specify the name of the instance .. see below. - name: Create snapshot. vmware_guest_snapshot: hostname: 192.168.1.49. rigid trike frame The first step is hitting the root endpoint of API to get a list of users: - name: Running API uri: url: https://api.github.com/users method: GET return_content: yes register: user_list - …JSON parsing examples. This repo will grow overtime and give examples of parsing JSON to be able to get to the bit of information you want. BOth examples five you the same output, but …The first step is hitting the root endpoint of API to get a list of users: - name: Running API uri: url: https://api.github.com/users method: GET return_content: yes register: user_list - name: App Details debug: var=user_list The above block will get the list of users which gets stored in user_list variable using uri module of Ansible. message believer The common task of parsing RSS or XML files is made easy in this step-by-step Objective-C tutorial that shows you how to do it. Although a built-in XML parser adds real value to a new desktop or mobile application, coding that functionality...To read JSON file into the ansible playbook, ansible has given us a filter named from_json but, of course, we need to use it along with few more commands and module like shell to read... haptic communication pdf Parsing JSON with Ansible …. I have been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API. A useful filter I have been using in Ansible is taking output from a shell action and turning it into something one can consume via variables. This example ...One of the most basic needs when using Ansible is the Ansible inventory. For years the mainstay has been the INI, YAML, or JSON-based flat file neatly located in /etc/ansible/inventory by default. Press Clone or download and press Use SSH in the panel that appears. The panel will change to Clone with SSH with the updated link. Copy the link by ... warzone cpu and gpu usage One of the most basic needs when using Ansible is the Ansible inventory. For years the mainstay has been the INI, YAML, or JSON-based flat file neatly located in /etc/ansible/inventory by default. Press Clone or download and press Use SSH in the panel that appears. The panel will change to Clone with SSH with the updated link. Copy the link by ...How to parse json in Ansible? I haven't been able to figure this out yet, is there a way in Ansible to parse json responses from URI calls? Eg: If I were to query an elastic search stack for their license status, I'd like to know if the type is basic, gold, premium or something else. Eg json: "license" : { "status" : "active", In this example, I use set_fact: to register each item as a variable and then use debug to display the variables. This example is the better one to use. I also use a lookup instead of a shell command to bring the json into ansible. Now it's simply a matter of using the variables where you need them. --- - name: ReadJsonfile hosts: localhost ... Here is an example of using the register parameter with the find module. - find: paths: /tmp register: out. betrcode / ansible - parse - json -and-loop Public Notifications Fork 2 Star 2 2 stars 2 forks Star Notifications Code Issues 0 Pull requests 0 Actions Projects 0 Wiki Security Insights This commit does not belong to any branch on this ... sign in ea 1 Answer Sorted by: 0 You refer variables as if they are at the top level, whereas they are under Tomcat key. Use hosts: " { {Tomcat.Server}}" or reformat your json file to eliminate Tomcat level. Share Improve this answer Follow answered Jun 5, 2017 at 9:37 Konstantin Suvorov 62k 8 151 181 Add a comment Your AnswerI've been trying to automatically set up firewall policies from a script. When I run my script I get this exception: fatal: [firewall01]: FAILED! => {"changed": false, "msg": "Failure when …Ansible 2.5 added an XML parsing filter that use XPath expressions to extract data from XML documents returned by devices that cannot produce JSON output (example: Nexus OS) and don't have Ansible network modules (like junos_command) that would do automatic XML parsing.. Worst Case: Use a Hack. If you can't get the structured data from your device, can't use NAPALM or NTC-Ansible and don ...Here is an example of using the register parameter with the find module. - find: paths: /tmp register: out. betrcode / ansible - parse - json -and-loop Public Notifications Fork 2 Star 2 2 stars 2 forks Star Notifications Code Issues 0 Pull requests 0 Actions Projects 0 Wiki Security Insights This commit does not belong to any branch on this ... newport news va weather Ansible 2.5 added an XML parsing filter that use XPath expressions to extract data from XML documents returned by devices that cannot produce JSON output (example: Nexus OS) and don't have Ansible network modules (like junos_command) that would do automatic XML parsing. Worst Case: Use a Hack This method is very simple to implement. This tutorial demonstrates how to classify structured data (e.g. tabular data in a CSV). We will use Keras to define the model, and tf.feature_column as a bridge to map from columns in a CSV to features used to train the model. This tutorial contains complete code to: Load a CSV file using Pandas. police code for bathroom break To go two levels down, for example, you need to follow the hierarchy of the key names to that point, which translates to input.parsed.interfaces, in this case. input is the variable that stores the JSON data, parsed the top-level key, and interfaces is the subsequent one. In a playbook, this will looks like: - name: Go down the JSON file 2 levels06‏/11‏/2019 ... ... embrace YAML files or are up to speed with inventory scripts. Ansible is able to parse them to the JSON inventory object it needs. minimum wage 2023 uk There was also a similar bug with the uri module (which takes a json parameter) earlier. Looking at the fix for that bug I see that we added code to the module so that if it received a string it would pass it through but if it received a python dict or list it would turn that into a json string.In this tutorial, we will learn how to convert the JSON (JavaScript Object Notation) string to the Python dictionary Another function that helps us store a JSON object is JSON_MERGE For example: { :name => "Konata Izumi", 'age' => 16, 1 => 2 } assign: 1- Although they both receive any number of objects but lodash's merge apply a deep merge of.The following procedure describes how you can ensure the presence of multiple users in IdM using an Ansible playbook. The users are stored in a JSON file. my champion generator will not startSep 22, 2022 · In ansible, debug module is used to print the output to the terminal. You can also create a decision-based task by combining the register attributes with the conditional statement (when).. "/> ecu sdn; la grande oregon zip code; discord experiments twitter;An Ansible inventory file uses the INI configuration format by default. Users can also use JSON (JavaScript Object Notation) configuration format for ... arijit singh concert 2023 30‏/01‏/2022 ... name: Read file directly into fact ansible.builtin.set_fact: jsondata: "{{ lookup('file', './example.json') }}" - name: Update the fact ...Jun 12, 2018 · From the full JSON I just need the values: "name": "vmh20.lab.test" "name": "vmh19.lab.test". This output can give any number of hosts in the cluster depending in the cluster size. I want to use those values as entry for hostname at the task: - name: Modify root local user to ESXi vmware_local_user_manager: hostname: ' { { item.results.json ... May 17, 2018 · Parsing JSON with Ansible …. I have been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API. A useful filter I have been using in Ansible is taking output from a shell action and turning it into something one can consume via variables. This example ... Ansible 2.5 added an XML parsing filter that use XPath expressions to extract data from XML documents returned by devices that cannot produce JSON output (example: Nexus OS) and don't have Ansible network modules (like junos_command) that would do automatic XML parsing. Worst Case: Use a Hack novi schools assistant superintendent Do you want to load up JSON data from a file directly into your Ansible playbook, tasks or roles? Did you start by trying to read it via a shell or command ... volusia county clerk of court public records The first step is hitting the root endpoint of API to get a list of users: - name: Running API uri: url: https://api.github.com/users method: GET return_content: yes register: user_list - name: App Details debug: var=user_list The above block will get the list of users which gets stored in user_list variable using uri module of Ansible.Here is an example of using the register parameter with the find module. - find: paths: /tmp register: out. betrcode / ansible - parse - json -and-loop Public Notifications Fork 2 Star 2 2 stars 2 forks Star Notifications Code Issues 0 Pull requests 0 Actions Projects 0 Wiki Security Insights This commit does not belong to any branch on this ...16‏/08‏/2016 ... ... at how to parse non-trivial JSON from REST API in Ansible using ... code and possibly separate that logic into a separate block/file. huggy wuggy rule 34 17‏/03‏/2019 ... Hi again after longtime, today we will learn how to read variable from json/yaml file via ansible. In our automation stuff, sometime we may ...Nov 07, 2022 · Although Ansible will natively convert serialized JSON to Ansible native data when recognized, you can also use the cli_parse module for this conversion. Example task: - name : "Run command and parse as json" ansible.utils.cli_parse : command : show interface | json parser : name : ansible.utils.json register : interfaces May 17, 2018 · Parsing JSON with Ansible …. I have been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API. A useful filter I have been using in Ansible is taking output from a shell action and turning it into something one can consume via variables. This example ... This means you could run. ansible-playbook playbooks/build_everything.yml -i my_ inventory _ script .py. and instead of reading from a hosts file, it will read the output (a JSON object) from your script use that as the hosts. dating is impossible for guys reddit Below is the example of how you can write a playbook using set_fact and filter the json data using ‘ from_json ’ - set_fact: total_count=" { { result.content | from_json | json_query ('paging.total')}}" - include: sentemail.yml when: total_groups == '0' ignore_errors: true If group is exist and you want to fetch the group nameHere is an example of using the register parameter with the find module. - find: paths: /tmp register: out. betrcode / ansible - parse - json -and-loop Public Notifications Fork 2 Star 2 2 …In Visual Studio Code, go to File > Open Folder… as marked in the screenshot below. Now, select the project directory json-inventory/ and click on OK. The project directory should be opened with Visual Studio Code. Now, click on New File and create a new file ansible.cfg. Then, type in the following lines in the ansible.cfg file. chevelle project for sale california In case if you need to read a JSON formatted text and store it as a variable, it can be also handled by include_vars. - hosts: localhost tasks: - include_vars: file: variable-file.json name: variable - debug: var=variableI'm a newbie on Ansible network automation. I would like to try to create a network inventories to collect some of the information for a bunch of network devices. And ideally store each device information into a single csv. e.g. of the csv would look like this: ansible_net_hostname, ansible_net_image, ansible_versionnewgrounds video downloader android free deepfake app lund baron magnum 2150 for saleToggle navigation. Applied Filters . Category: WCF Misconfiguration File Disclosure. Clear All . ×. Need help on category filtering? Please contact support. click here where to buy plexus slim 12‏/05‏/2021 ... I am getting ansible playbook errors while executing the below ... We were unable to read either as JSON nor YAML, these are the errors we ...One of the most basic needs when using Ansible is the Ansible inventory. For years the mainstay has been the INI, YAML, or JSON-based flat file neatly located in /etc/ansible/inventory by default. Press Clone or download and press Use SSH in the panel that appears. The panel will change to Clone with SSH with the updated link. Copy the link by ... fresno rescue dogs What I'm looking for is the Name field at hc_pim_info.dpListProcessesReply.dpServiceList.dpService. I can get to this level, but can't get past the array and then the @Name. When I do, I get errors like this: "msg. Jun 19, 2022 · Ansible read JSON file - JSON file Parsing. In this article, we are going to see how to read the Includes support for creating and deleting both objects and buckets, retrieving objects as files or strings, generating download links and copy of an object that is already stored in Amazon S3. where is the asian carp originally from powerapps default selected dropdown taller younger sister lift me May 26, 2021 · After signing up or signing in ...May 17, 2018 · Parsing JSON with Ansible …. I have been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API. A useful filter I have been using in Ansible is taking output from a shell action and turning it into something one can consume via variables. This example ... May 17, 2018 · Parsing JSON with Ansible …. I have been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API. A useful filter I have been using in Ansible is taking output from a shell action and turning it into something one can consume via variables. This example ... ponderosa state park wedding Parsing JSON Although Ansible will natively convert serialized JSON to Ansible native data when recognized, you can also use the cli_parse module for this conversion. Example task: - name: "Run command and parse as json" ansible.utils.cli_parse: command: show interface | json parser: name: ansible.utils.json register: interfacesTo read JSON file into the ansible playbook, ansible has given us a filter named from_json but, of course, we need to use it along with few more commands and module like shell to read...Ansible organizes these tasks in playbook files, which run on one or more remote target hosts.Inventory files maintain lists of these hosts and are formatted as YAML or INI. 2. Ansible vault view encrypted files. As you see now we cannot see the content of our encrypted file. So to view the encrypted file What I'm looking for is the Name field at hc_pim_info.dpListProcessesReply.dpServiceList.dpService. I can get to this level, but can't get past the array and then the @Name. When I do, I get errors like this: "msg. Jun 19, 2022 · Ansible read JSON file - JSON file Parsing. In this article, we are going to see how to read the motorcycle poker run Oct 07, 2021 · ansible-playbook -l web1 playbook.yml --tags=nginx-vhost-config which is working fine, it will create from template a nginx vhost configuration file on the remote server as domain1.com.conf and so on for all the found definitions. What I'm looking for is the Name field at hc_pim_info.dpListProcessesReply.dpServiceList.dpService. I can get to this level, but can't get past the array and then the @Name. When I do, I get errors like this: "msg. Jun 19, 2022 · Ansible read JSON file - JSON file Parsing. In this article, we are going to see how to read the Includes support for creating and deleting both objects and buckets, retrieving objects as files or strings, generating download links and copy of an object that is already stored in Amazon S3. where is the asian carp originally from powerapps default selected dropdown taller younger sister lift me May 26, 2021 · After signing up or signing in ...Filters let you transform JSON data into YAML data, split a URL to extract ... To parse multi-document YAML strings, the from_yaml_all filter is provided. 1 bedroom flat to rent in folkestone Ansible parsing a JSON output. Ask Question Asked 4 years, 4 months ago. Modified 4 years, 4 months ago. ... column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Modify root local user to ESXi\n ^ here\n"} farrow and ball to dulux converter => short_os derived from ansible_network_os or ansible_distribution and set to lower case => command is the command passed to the module with spaces replaced with _ => extension is specific to the parser used (native=yaml, textfsm=textfsm, ttp=ttp) The default Ansible search path for the templates directory is used for parser templates as wellThis method is very simple to implement. This tutorial demonstrates how to classify structured data (e.g. tabular data in a CSV). We will use Keras to define the model, and tf.feature_column as a bridge to map from columns in a CSV to features used to train the model. This tutorial contains complete code to: Load a CSV file using Pandas.I'm a newbie on Ansible network automation. I would like to try to create a network inventories to collect some of the information for a bunch of network devices. And ideally store each device information into a single csv. e.g. of the csv would look like this: ansible_net_hostname, ansible_net_image, ansible_version three headed flail 5e Code Revisions 3 Stars 12 Forks 1. Download ZIP. Parsing JSON with Ansible... Raw. gistfile1.md. Recently, Everyday Hero has been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API. A useful filter we have been using in Ansible is taking output from. To do it with ANSIBLE: Use host prompt to choose the envid in the 1. curl file like this: name: Get json file shell: curl --output file.json -k -O https://example.tp.com/services/getMasterExtract.php?env_id= { {envid}}&product=all&du=all&format=json&resolved=true args: chdir: /tmp/ 2. Extract the Value:JSON is the most famous data representation it is widely used to store and transmit data. When you are working in Ansible automation, you might get a requirement to work with JSON files and read JSON files into Ansible playbook and process the data and store the data as a variables. In general, JSON data can be processed easily with json_query module of ansible and you can read more about it in our previous article dj0ip antenna