---

- name: Exercise3 (show arp)
  gather_facts: no
  hosts: cisco
  vars:
    creds:
        host: "{{ ansible_host }}"
        username: "{{ ansible_user }}"
        password: "{{ ansible_ssh_pass }}"

  tasks:
    - name: Obtain show arp output
      ios_command:
        provider: "{{ creds }}"
        commands: show arp
      register: show_arp

    - name: Print show arp to screen
      debug:
        var: show_arp

    - name: Create new fact from show arp (3a)
      set_fact:
        show_arp_new: "{{ show_arp.stdout_lines[0] }}"

    - name: Print show_arp_new to screen (3b)
      debug:
        var: show_arp_new

    - name: Only print gateway (3c)
      debug:
        var: item
      with_items: "{{ show_arp_new }}"
      when: "'10.220.88.1' in item"


---

- name: Exercise3 (show arp)
  gather_facts: no
  hosts: cisco
  vars:
    creds:
        host: "{{ ansible_host }}"
        username: "{{ ansible_user }}"
        password: "{{ ansible_ssh_pass }}"

  tasks:
    - name: Obtain show arp output
      ios_command:
        provider: "{{ creds }}"
        commands: show arp
      register: show_arp

    - name: Print show arp to screen
      debug:
        var: show_arp

    - name: Create new fact from show arp (3a)
      set_fact:
        show_arp_new: "{{ show_arp.stdout_lines[0] }}"

    - name: Print show_arp_new to screen (3b)
      debug:
        var: show_arp_new

    - name: Only print gateway (3c)
      debug:
        var: item
      with_items: "{{ show_arp_new }}"
      when: "'10.220.88.1 ' in item"


Add a space to so that .19 is not matched
Add a space to so that .19 is not matched
