From 5cd7bf39dd877c6b6e6abcf9111732b743923975 Mon Sep 17 00:00:00 2001 From: Nilashish Chakraborty Date: Mon, 11 Mar 2019 10:55:09 +0530 Subject: [PATCH] Update frr_facts (#53439) Signed-off-by: NilashishC --- lib/ansible/modules/network/frr/frr_facts.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/frr/frr_facts.py b/lib/ansible/modules/network/frr/frr_facts.py index be91ff5bcb..11670ebd89 100644 --- a/lib/ansible/modules/network/frr/frr_facts.py +++ b/lib/ansible/modules/network/frr/frr_facts.py @@ -73,7 +73,15 @@ ansible_net_hostname: returned: always type: str ansible_net_version: - description: The operating system version running on the remote device + description: The FRR version running on the remote device + returned: always + type: str +ansible_net_api: + description: The name of the transport + returned: always + type: str +ansible_net_python_version: + description: The Python version that the Ansible controller is using returned: always type: str @@ -108,6 +116,7 @@ ansible_net_mpls_ldp_neighbors: type: dict """ +import platform import re from ansible.module_utils.network.frr.frr import run_commands, get_capabilities @@ -160,6 +169,9 @@ class Default(FactsBase): if val: platform_facts[item] = val + platform_facts['api'] = resp['network_api'] + platform_facts['python_version'] = platform.python_version() + return platform_facts