I have a regex that matches everything after a certain word. When I call this pattern_match in my playbook I get the following error:
*ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to be in '/etc/ansible/REGEX.yml': line 12, column 6, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:*
show int bundle-ether 21 | inc clearing
- name: get time
^ here
The code is below:
---
- hosts: SCRING
gather_facts: true
connection: network_cli
tasks:
- name: show int | inc clearing
iosxr_command:
commands:
show int bundle-ether 21 | inc clearing
- name: get time
pattern_match:
regex: "(?<=counters ).*$"
export: yes
register: last
- debug:
msg: "{{ inventory_hostname }} counters last cleared - {{ last }}"