[ansible-project] Re: Connecting to Cisco IOS device through Cisco terminal server (29xx)

2017-07-11 Thread psprygada
This will not work with the current network modules.

On Monday, July 10, 2017 at 2:55:18 PM UTC-5, coo...@gmail.com wrote:
>
> I would like Ansible to connect to the console port of IOS devices to 
> provision them.  I have set up a Cisco 29xx terminal server to use SSH. 
>  The issue is that in order to access the device, you must now go through 
> two prompts.  The first prompt username/password, then hit Enter to bring 
> up the second prompt.  From here it is like logging into the device as 
> normal.
>
>
> 
> Is there anyway to use the current ios modules (facts, command, config, 
> etc) to login in this manner?  Or are there any other solutions?  Thanks 
> for any assistance!
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6998092b-6e17-4763-9708-5ff4fa087974%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Problem using nxos_command module

2016-03-09 Thread psprygada
Thanks for the additional details.  Its definitely a bug that affects the 
9K (the nxapi implementation is a little different).  Working on a fix that 
will be available soon

On Monday, March 7, 2016 at 5:44:45 PM UTC-5, Roger Gomez wrote:
>
>
>
> On Sunday, March 6, 2016 at 10:43:54 PM UTC-5, pspr...@ansible.com wrote:
>>
>> HI Roger,
>>
>> Two questions:
>>
>> 1) Are you able to browse to http://leaf-switch:80/ins 
>>  (assuming you have nxapi sandbox configured)?
>>
> Yes, I'm able to browse and make REST API calls.  
>
>>
>> 2) What platform and nxos version are you running?
>>
>This test was in n9000-dk9.*7.0.3.I1.2*.bin but I also did it in 
> on 6.1(2)I3(1) 
>
>>
>>
>>
>> On Friday, March 4, 2016 at 6:52:37 PM UTC-5, Roger Gomez wrote:
>>>
>>> I have been trying to test the Cisco NXOS modules and the nxos_command 
>>> is failing and I don't understand why:
>>> cmd.yml
>>> ---
>>> - hosts:
>>>   - leaf-switch
>>>   gather_facts: no
>>>   tasks:
>>>   - nxos_command:
>>>  username: user
>>>  password: password
>>>  commands:
>>>  - show version
>>>  transport: nxapi
>>>  use_ssl: no
>>>  host: leaf-switch
>>> delegate_to: localhost
>>>
>>> When I run the playbook I have this back:
>>>
 PLAY 
> ***


> TASK [nxos_command] 
> 

 fatal: [leaf-switch -> localhost]: FAILED! => {"changed": false, 
> "failed": true, "msg": "HTTP Error 400: Bad Request", "status": 400, 
> "url": 
> "http://leaf-switch:80/ins"}


> NO MORE HOSTS LEFT 
> *

 to retry, use: --limit @com.retry


> PLAY RECAP 
> *

 leaf-switch: ok=0changed=0unreachable=0
> failed=1


 The switch is enable for NXAPI and I can use it, if I only change the 
>>> transport from nxapi to cli everything works just fine.
>>> Any idea what could be the reason?
>>> Thanks. 
>>>  
>>>
>>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ae44fd00-2ff0-4e94-8788-70927460e2eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible with Cisco IOS and two steps authentication (Tacacs)

2016-03-08 Thread psprygada
You can use the following arguments to any of the IOS modules:

authorize: yes 
auth_pass: 
> Hi guys
>
> I am totally new to Ansible. Could anyone of you please point me to an 
> example on how to use Ansible with two steps authentication? Our network 
> devices access in controlled by Tacas+ and we have to authenticate to get 
> access and then use "enable x" to get to the access level that we need. 
> This command also requires authentication How is this handled in Ansible?
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4c09b0e8-ee88-44d7-b4ce-0be017931d1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Problem using nxos_command module

2016-03-06 Thread psprygada
HI Roger,

Two questions:

1) Are you able to browse to http://leaf-switch:80/ins 
 (assuming you have nxapi sandbox configured)?

2) What platform and nxos version are you running?



On Friday, March 4, 2016 at 6:52:37 PM UTC-5, Roger Gomez wrote:
>
> I have been trying to test the Cisco NXOS modules and the nxos_command is 
> failing and I don't understand why:
> cmd.yml
> ---
> - hosts:
>   - leaf-switch
>   gather_facts: no
>   tasks:
>   - nxos_command:
>  username: user
>  password: password
>  commands:
>  - show version
>  transport: nxapi
>  use_ssl: no
>  host: leaf-switch
> delegate_to: localhost
>
> When I run the playbook I have this back:
>
>> PLAY 
>>> ***
>>
>>
>>> TASK [nxos_command] 
>>> 
>>
>> fatal: [leaf-switch -> localhost]: FAILED! => {"changed": false, 
>>> "failed": true, "msg": "HTTP Error 400: Bad Request", "status": 400, "url": 
>>> "http://leaf-switch:80/ins"}
>>
>>
>>> NO MORE HOSTS LEFT 
>>> *
>>
>> to retry, use: --limit @com.retry
>>
>>
>>> PLAY RECAP 
>>> *
>>
>> leaf-switch: ok=0changed=0unreachable=0
>>> failed=1
>>
>>
>> The switch is enable for NXAPI and I can use it, if I only change the 
> transport from nxapi to cli everything works just fine.
> Any idea what could be the reason?
> Thanks. 
>  
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/13d7d900-6903-4e1a-99a2-38932d03bd52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Raw module and interactive commands

2015-12-01 Thread psprygada
What switch are you trying to send commands to?   

We have started to incorporate network device support into the module_utils 
for connecting to interactive devices over ssh with initial support for IOS 
based devices.   See here for the IOS shared module support 
(https://github.com/ansible/ansible/pull/13358/files) and here 
(https://github.com/ansible/ansible-modules-core/pull/2587/files) for an 
example module

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d80472a1-122e-4705-a835-599a5fa434c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.