I have created a simple playbook to parse the output in json format by using a pyats genie but everytime I run the playbook, I get the following, however I made sure I do have pyats install, can someone take look if I am missing something or doing something wrong.
TASK [show version] ************************************************************************************************
Monday 25 January 2021 18:02:17 +0000 (0:00:00.074) 0:00:00.074 ********
ok: [switch01]
TASK [Set Fact Genie Filter] ***************************************************************************************
Monday 25 January 2021 18:02:25 +0000 (0:00:08.056) 0:00:08.131 ********
fatal: [switch01]: FAILED! => {"msg": "parse_genie: pyATS package is not installed. To install, run 'pip install pyats'."}
PLAY RECAP *********************************************************************************************************
switch01 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
here is my playbook
---
- name: Genie Parse for IOS
hosts: IOS
gather_facts: no
connection: network_cli
roles:
- parse_genie
tasks:
- name: show version
ios_command:
commands:
- show version
register: version
- name: Set Fact Genie Filter
set_fact:
pyats_version: "{{ version['stdout'][0] | parse_genie(command='show version', os='ios') }}"
- name: Debug Genie Filter
debug:
var: pyats_version
I have tried this with virtual environment too with python3.6 but same results, I was following this link
https://the-packet-thrower.com/2020/01/04/ticket-please-a-servicenow-automation-post/
question from:
https://stackoverflow.com/questions/65890205/pyats-package-is-not-installed-ansible 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…