Hi all,

I have the following playbook 

- hosts: r2
  gather_facts: true
  connection: local
      host: "{{ ansible_host }}"
      username: cisco
      password: cisco
    - name: ios_facts
         provider: "{{ creds }}"
    - debug:
        var: ansible_net_interfaces

If I do a debut I get this output

"ansible_net_interfaces": {
        "Ethernet0/0": {
            "bandwidth": 10000, 
            "description": null, 
            "duplex": null, 
            "ipv4": [
                    "address": "", 
                    "subnet": "24"
            "lineprotocol": "up ", 
            "macaddress": "aabb.cc00.2000", 
            "mediatype": null, 
            "mtu": 1500, 
            "operstatus": "up", 
            "type": "AmdP2"
        "Ethernet0/1": {
            "bandwidth": 10000, 
            "description": null, 
            "duplex": null, 
            "ipv4": [], 
            "lineprotocol": "down ", 
            "macaddress": "aabb.cc00.2010", 
            "mediatype": null, 
            "mtu": 1500, 
            "operstatus": "administratively down", 
            "type": "AmdP2"

What im trying to do is to check if the fact "lineprotocol" is up or down, 
but when I put the fact in my var is not working, how should I do this?


You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to