Forum Discussion
forsan_102218
Nov 06, 2018Nimbostratus
Ansible bigip_device_facts - Filter Output
Hi,
I'm new to ansible and have installed ansible version 2.7 and I'm trying to understand how I can filter the output from the new bigip_device_facts module as bigip_facts are depreciated.
I ha...
- Nov 08, 2018
The result from bigip_device_facts contains a list of dictionaries. It can be processed in a number of ways depending on the output you want, but here's a simple example how to print the output with debug:
- bigip_device_facts: provider: "{{ provider_vars }}" gather_subset: - vlans register: gathered_facts - name: "Debug vlans" debug: msg: "VLAN {{ item.name }} has tag {{ item.tag }}" with_items: "{{ gathered_facts.vlans }}"
Alex_240062
Nov 08, 2018Nimbostratus
The result from bigip_device_facts contains a list of dictionaries. It can be processed in a number of ways depending on the output you want, but here's a simple example how to print the output with debug:
- bigip_device_facts:
provider: "{{ provider_vars }}"
gather_subset:
- vlans
register: gathered_facts
- name: "Debug vlans"
debug:
msg: "VLAN {{ item.name }} has tag {{ item.tag }}"
with_items: "{{ gathered_facts.vlans }}"
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects