Genie Parsed Command

# RADKIT Genie Parsed Command Example
#
# This example shows how an example playbook of how you can execute a command or
# commands against one or more devices without a connection plugin.  Using that output
# a pyats genie parser is applied to get structured data.
#
# In order for RADKIT to make a connection, expose variables as environment variables or
# optionally, add them as variables in the playbook.
#
#  export RADKIT_ANSIBLE_CLIENT_PRIVATE_KEY_PASSWORD_BASE64=$(echo -n 'mypassword' | base64)
#  export RADKIT_ANSIBLE_IDENTITY="myuserid@cisco.com"
#  export RADKIT_ANSIBLE_SERVICE_SERIAL="xxxx-xxx-xxxx"
#
---
- name: Example of RADKIT Genie Parse
  hosts: daa-csr1
  become: no
  gather_facts: no
  tasks:
    - name: Get show version parsed output removed return keys
      cisco.radkit.genie_parsed_command:
        device_name: "{{ inventory_hostname }}"
        commands: show version
        os: fingerprint
        remove_cmd_and_device_keys: yes
      register: cmd_output
      delegate_to: localhost

    - name: Show IOS version
      debug:
        msg: "{{ cmd_output['genie_parsed_result']['version']['version'] }}"