diff --git a/lib/ansible/modules/network/nxos/nxos_facts.py b/lib/ansible/modules/network/nxos/nxos_facts.py index 443dc1f4699..c9cf6e8a839 100644 --- a/lib/ansible/modules/network/nxos/nxos_facts.py +++ b/lib/ansible/modules/network/nxos/nxos_facts.py @@ -281,6 +281,15 @@ class Interfaces(FactsBase): ('prefix', 'subnet') ]) + def ipv6_structure_op_supported(self): + data = self.run('show version', 'json') + if data: + unsupported_versions = ['I2', 'F1', 'A8'] + for ver in unsupported_versions: + if ver in data.get('kickstart_ver_str'): + return False + return True + def populate(self): self.facts['all_ipv4_addresses'] = list() self.facts['all_ipv6_addresses'] = list() @@ -289,7 +298,7 @@ class Interfaces(FactsBase): if data: self.facts['interfaces'] = self.populate_interfaces(data) - data = self.run('show ipv6 interface', 'json') + data = self.run('show ipv6 interface', 'json') if self.ipv6_structure_op_supported() else None if data and not isinstance(data, string_types): self.parse_ipv6_interfaces(data)