Ok, so I bit the bullet and upgraded to ansible 2.6.2.

The nxos_facts command no longer blows up on the older images.
It doesn't return any actual facts either, but not blowing up is good - 
maybe. I do like the idea of failing early and failing loudly.

    "hw_facts": {
        "ansible_facts": {
            "ansible_net_gather_subset": [
                "default"
            ],
            "ansible_net_hostname": null,
            "ansible_net_image": null,
            "ansible_net_model": null,
            "ansible_net_serialnum": null,
            "ansible_net_version": null
        },
        "changed": false,
        "failed": false
    }



On Tuesday, August 14, 2018 at 11:14:51 AM UTC-5, Dennis McCarthy wrote:
>
> Jonathan,
> Your response sounds like you've never heard this sort of thing before, 
> which kinda strike me as odd in light of the issues in github.
> But yes, I've followed the recommendations you reference.
> Here is an example of the one of the many tasks that produce this type of 
> error:
>
> - name: "Gathering HW Facts"
> nxos_facts:
> gather_subset: default
> provider: "{{ provider }}"
> register: "hw_facts"
> when: "os =='nxos'"
>
>
> On Monday, August 13, 2018 at 5:55:30 PM UTC-5, Jonathan Lozada De La 
> Matta wrote:
>>
>> Dennis,
>>
>> I'm not an expert on networking but, we can try to gather some 
>> information and track it down. How does your playbook/role look like ? did 
>> you follow the instructions in here 
>> https://docs.ansible.com/ansible/2.5/network/user_guide/platform_nxos.html#nxos-platform-options
>> ?
>>
>> On Mon, Aug 13, 2018 at 6:44 PM Dennis McCarthy <[email protected]> 
>> wrote:
>>
>>> I'm running ansible 2.5.5-1.
>>> It seems that the issue I have where the nxos_module spits out an error 
>>> seem to be related to the version or image on the device I'm trying to 
>>> connect to.
>>> I think the error is saying that the object containing stdout doesn't 
>>> have a get() method. "unicode", that there is like a sub-class of string, 
>>> right?
>>>
>>> I'm reading thru issues on git-hub, but they talk way over my head. 
>>> ELI5 (Explain it Like I'm 5);
>>>   IS this fixed in 2.6?
>>>   Is this a "too bad, so sad" sort of issue where I just need to get 
>>> newer switches or older ansible?
>>>
>>> The Error:
>>> fatal: [NDDCBPSWNX01]: FAILED! => changed=false
>>>   module_stderr: |-
>>>     Traceback (most recent call last):
>>>       File "/tmp/ansible_5wMQsv/ansible_module_nxos_facts.py", line 602, 
>>> in <module>
>>>         main()
>>>       File "/tmp/ansible_5wMQsv/ansible_module_nxos_facts.py", line 585, 
>>> in main
>>>         inst.populate()
>>>       File "/tmp/ansible_5wMQsv/ansible_module_nxos_facts.py", line 233, 
>>> in populate
>>>         if data.get('sys_ver_str'):
>>>     AttributeError: 'unicode' object has no attribute 'get'
>>>   module_stdout: ''
>>>   msg: MODULE FAILURE
>>>   rc: 1
>>> An exception occurred during task execution. To see the full traceback, 
>>> use -vvv. The error was: AttributeError: 'unicode' object has no attribute 
>>> 'get'
>>>
>>>
>>> The results of my testing:
>>>
>>> Connection IOSVersion
>>> Failed 5.2(1)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2011 by Cisco 
>>> Systems, Inc. Device Manager Version 6.1(1),  Compiled 7/12/2012 19:00:00
>>> Worked 6.0(2)A6(4), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
>>> Systems, Inc.   Compiled 8/18/2015 13:00:00
>>> Worked 6.0(2)A8(3), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
>>> Systems, Inc.   Compiled 10/28/2016 20:00:00
>>> Failed 6.0(2)N1(2), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
>>> Systems, Inc. Device Manager Version 6.0(2)N1(1),  Compiled 3/14/2013 
>>> 1:00:00
>>> Worked 6.0(2)U6(10), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
>>> Systems, Inc.   Compiled 3/30/2017 9:00:00
>>> Failed 6.0(4), RELEASE SOFTWARE Copyright (c) 2002-2011 by Cisco 
>>> Systems, Inc. Compiled 6/6/2012 18:00:00
>>> Failed 6.1(2), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
>>> Systems, Inc. Compiled 9/7/2012 13:00:00
>>> Failed 6.2(16), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco 
>>> Systems, Inc. Compiled 1/27/2016 9:00:00
>>> Failed 7.0(1)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco 
>>> Systems, Inc. Device Manager Version 6.3(1),  Compiled 3/19/2014 14:00:00
>>> Worked 7.0(3)I2(2a), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco 
>>> Systems, Inc. Compiled 12/14/2015 3:00:00
>>> Worked 7.0(3)I2(2b), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco 
>>> Systems, Inc. Compiled 2/28/2016 19:00:00
>>> Worked 7.0(3)I5(1), RELEASE SOFTWARE Copyright (c) 2002-2016 by Cisco 
>>> Systems, Inc. Compiled 10/29/2016 8:00:00
>>> Worked 7.3(2)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2012, 2016-2017 
>>> by Cisco Systems, Inc. Device Manager Version 6.0(2)N1(1),Compiled 
>>> 5/12/2017 23:00:00
>>>
>>> -- 
>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/485a2dcf-4c76-41a4-a0ae-448dec9f81e9%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/ansible-project/485a2dcf-4c76-41a4-a0ae-448dec9f81e9%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>>
>> Jonathan lozada de la matta
>>
>> AUTOMATION CONSULTANT - AUTOMATION PRACTICE
>>
>> Red Hat Consulting Services <https://www.redhat.com/>
>>
>> [email protected]    
>>
>>
>>  
>>
>>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/06e48742-d40b-4210-85ed-d8a89df4f2e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to