nxos_hsrp: fix 'sh_preempt': <unknown enum:> (#52858)

* nxos_hsrp: fix 'sh_preempt': <unknown enum:>

Some older nxos images fail to set this attr value. This fix checks for
unknown enum and issues a second (unstructured) call to the device to get
the data.

* add whitespace for pep8
This commit is contained in:
Chris Van Heuveln
2019-02-27 03:50:50 -05:00
committed by Trishna Guha
parent b1f117ec99
commit 5dc65d0dfc
2 changed files with 17 additions and 2 deletions

View File

@@ -9,7 +9,7 @@
- block:
- name: "Enable feature hsrp"
nxos_feature:
nxos_feature:
feature: hsrp
provider: "{{ connection }}"
state: enabled
@@ -155,7 +155,7 @@
always:
- name: "Disable feature hsrp"
nxos_feature:
nxos_feature:
feature: hsrp
provider: "{{ connection }}"
state: disabled