Re: [ansible-project] Re: Ansible upgrade cisco switch stack firmware

2021-03-12 Thread Ganesh Nalawade
If the high value of persistent command timeout is applicable for one task it can be set at task level. Refer https://docs.ansible.com/ansible/devel/network/user_guide/network_debug_troubleshooting.html#command-timeout On Sat, 13 Mar 2021 at 1:40 AM, madd...@gmail.com wrote: > I answered my own

Re: [ansible-project] Re: Ansible upgrade cisco switch stack firmware

2021-03-11 Thread Ganesh Nalawade
You can use cli_command module to handle multiple prompts on network device. Refer: https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/cli_command_module.html On Thu, 11 Mar 2021 at 8:37 PM, madd...@gmail.com wrote: > I ended up running the following manually. I just need a

Re: [ansible-project] lxml.etree.XMLSyntaxError using python3.6

2020-10-06 Thread Ganesh Nalawade
t;src/lxml/parser.pxi", line 1856, in lxml.etree._parseDocument > File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument > File "src/lxml/parser.pxi", line 1757, in lxml.etree._parseDoc > File "src/lxml/parser.pxi", line 106

Re: [ansible-project] lxml.etree.XMLSyntaxError using python3.6

2020-10-06 Thread Ganesh Nalawade
>> File "src/lxml/parser.pxi", line 1876, in >> lxml.etree._parseMemoryDocument >> File "src/lxml/parser.pxi", line 1757, in lxml.etree._parseDoc >> File "src/lxml/parser.pxi", line 1068, in >> lxml.etree._BaseParser._parseUnicodeDoc

Re: [ansible-project] lxml.etree.XMLSyntaxError using python3.6

2020-10-01 Thread Ganesh Nalawade
It looks like it is failing while parsing the response. Please enable the persistent logging to identify exactly which RPC response is failing Refer: https://docs.ansible.com/ansible/devel/network/user_guide/network_debug_troubleshooting.html#enabling-networking-device-interaction-logging On

Re: [ansible-project] cisco.ios help

2020-07-14 Thread Ganesh Nalawade
Most likely the error is due to missing privilege escalation. Refer https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html#using-cli-in-ansible for adding ansible_become and ansible_become_password settings. Also, FYI ios_vlan module is deprecated, instead use ios_vlans

Re: [ansible-project] Ansible netconf module supporting netconf notifications

2020-04-12 Thread Ganesh Nalawade
You can use netconf_rpc module to create netconf subscription using Ansible, processing notification is not supported with Ansible. On Sun, Apr 12, 2020 at 8:05 PM Senthil Jayakumar < senthil.jayaku...@gmail.com> wrote: > Hi There, > > I appreciate if the excerpts could respond to this query. >

Re: [ansible-project] Problems with ios_command and prompt '[y/n]'

2020-02-04 Thread Ganesh Nalawade
The value of prompt option is a python regex hence either handle special character in prompt correctly by using escape character or remove those characters from prompt completely. For example: - name: remove old OS files ios_command: commands: - command: install

[ansible-project] Re: Ansible with network equipment (Comware 5 switch)

2019-08-12 Thread Ganesh Nalawade
The module seems to use paramiko_ssh to connect to the remote host. Try changing the inventory entry as below since the module is expected to run on the control node. [switch1] 192.168.xx.xx ansible_connection=local OR

[ansible-project] Re: problem copy/template module with edgerouter

2019-08-07 Thread Ganesh Nalawade
You can try with net_put module https://docs.ansible.com/ansible/latest/modules/net_put_module.html On Wednesday, 7 August 2019 09:17:28 UTC+5:30, Chang Eric wrote: > > I want to configure some of edgerouters with ansible > one of the tasks is send a user`s public key then config authenticate

Re: [ansible-project] Re: What would be the checkpoint firewall ansible_network_os

2019-07-29 Thread Ganesh Nalawade
on/network_cli.py", > line 334, in _connect > self._terminal.on_open_shell() > File "/usr/lib/python2.7/site-packages/ansible/plugins/terminal/ios.py", > line 58, in on_open_shell > raise AnsibleConnectionFailure('unable to set terminal parameters') > AnsibleConnectionFailure: unable to set terminal parameters > > fatal: [firewall]: FAILED! => { > "msg": "unable to set t

[ansible-project] Re: How to get past network device introductory menu

2019-07-24 Thread Ganesh Nalawade
It is currently not supported. However, I have raised a feature PR to add this support Refer: https://github.com/ansible/ansible/pull/59525 Please test this PR branch in your environment and comment on the PR if it works for you or not. On Tuesday, 23 July 2019 21:20:53 UTC+5:30, Pete

Re: [ansible-project] dealing with prompt scenario in privilege mode

2019-07-19 Thread Ganesh Nalawade
You can use the cli_command module to handle prompts Refer: https://docs.ansible.com/ansible/latest/modules/cli_command_module.html On Fri, Jul 19, 2019 at 10:36 AM SR wrote: > Any pointers on how to deal with scenarios where system prompt for user > input in ios_config module ? . I am trying

Re: [ansible-project] Re: frr_facts and/or frr_bgp give assertionError?

2019-06-26 Thread Ganesh Nalawade
Please try setting below variables in inventory file: ansible_network_os=frr ansible_connection=network_cli network_cli uses persistent connection and the value _socket_path is set after the connection with the remote host is successful in task_executor

Re: [ansible-project] junos_scp not working

2019-05-20 Thread Ganesh Nalawade
rver has NETCONF connection setup with password, but, it fails on > junos_scp. If I replace juno_scp with junos_command, there are no this > kinds of issue at all. > > On Friday, May 17, 2019 at 8:08:22 PM UTC-7, Ganesh Nalawade wrote: >> >> Based on the logs it seems you have no

Re: [ansible-project] junos_scp not working

2019-05-17 Thread Ganesh Nalawade
Based on the logs it seems you have not set the value of provider argument in the task. junos_scp module requires the provider key to be set. More details refer the module documentation https://docs.ansible.com/ansible/latest/modules/junos_scp_module.html On Fri, May 17, 2019 at 4:38 PM Yan Sun

[ansible-project] Re: Can ios_config handle responding to two prompts in a row?

2019-03-10 Thread Ganesh Nalawade
You can use cli_command module available in Ansible 2.7 version onwards https://docs.ansible.com/ansible/latest/modules/cli_command_module.html The task can be modified as below to support multiple prompts. - name: Respond to double-password prompt cli_command: commands: - command:

Re: [ansible-project] Re: Can network_cli or expect run tasks via SSH on simple embedded devices?

2019-02-27 Thread Ganesh Nalawade
e base > or generic option to choose? A quick look at the source code did not seem > to indicate anything obvious either. > > Thank you! > > ‐‐‐ Original Message ‐‐‐ > On Tuesday, February 26, 2019 11:51 PM, Ganesh Nalawade > wrote: > > > "network_cl

[ansible-project] Re: Can network_cli or expect run tasks via SSH on simple embedded devices?

2019-02-26 Thread Ganesh Nalawade
"network_cli" connection plugin creates a pseudo terminal on the control node which establishes ssh connection with target host. So ideally it can be used to talk to any SSH-based target host. network_cli connection plugin relies on value of ansible_network_os config variable to load the

Re: [ansible-project] netconf_config - Viptela

2019-02-21 Thread Ganesh Nalawade
s:nc=\"urn:ietf:params:xml:ns:netconf:base:1.0\" > message-id=\"urn:uuid:1e74d2f9-be5e-4be1-8543-a990b7d207e4\">", > "stdout_lines": [ > " xmlns:nc=\"urn:ietf:params:xml:ns:netconf:base:1.0\" > message-id=\"urn:uuid:1e74d2

Re: [ansible-project] netconf_config - Viptela

2019-02-21 Thread Ganesh Nalawade
> "Element [{http://tail-f.com/ns/config/1.0}config] does not meet requirement" Based on the error received from netconf server running on target host it seems the rooted xml payload is not supported by the server. As per netconf rfc for edit-config RPC the config value should have "config"

[ansible-project] Re: sros network modules in ansible 2.7.0

2019-01-12 Thread Ganesh Nalawade
The issue is fixed by PR #49174 and the fix is available in Ansible version 2.7.5 Please retest with 2.7.5 version and check if the issue is still seen. Regards, Ganesh On Saturday, 12 January 2019 06:01:40 UTC+5:30, Mike Dodd wrote: > > Here is a perfect example of the bug, also using

[ansible-project] Re: Ansible and Huawei

2019-01-04 Thread Ganesh Nalawade
The error you are seeing is coming from ncclient library. Are you able to connect to the device using a sample python script that uses ncclinet library? Reference python script: https://github.com/ncclient/ncclient/blob/master/examples/nc01.py Regards, Ganesh On Thursday, 3 January 2019

[ansible-project] Re: Rebooting a Cisco ASA device

2019-01-03 Thread Ganesh Nalawade
Try adding "meta: reset_connection" after wait_for task and before check version task. Also, which Ansible version are you using? Regards, Ganesh On Friday, 4 January 2019 04:26:41 UTC+5:30, Sahar wrote: > > I'm trying to reboot a Cisco ASA Firewall, and run the "show version" > command after

[ansible-project] Re: Does Ansible support actions for NETCONF devices?

2019-01-03 Thread Ganesh Nalawade
Since action is a netconf RPC defined in RFC 7950 it can be executed using Ansible netconf_rpc module. - name: execute action rpc netconf_rpc: rpc: action xmlns: "urn:ietf:params:xml:ns:yang:1" content: | apache-1

[ansible-project] Re: Ansible netconf is not working with Cisco IOS

2018-10-29 Thread Ganesh Nalawade
Which Ansible version are you using? There was a similar issue reported on 2.7.0 https://github.com/ansible/ansible/issues/46257 This issue is fixed in 2.7.1 release. If you are still seeing this issue on 2.7.1 please raise a Github issue with relevant details. Regards, Ganesh On Saturday,

Re: [ansible-project] ios_facts failing to populate all interfaces (edit and running-config) #44463

2018-10-10 Thread Ganesh Nalawade
I have posted a comment in issue with a possible workaround. The final fix for this issue is still discussed and hopefully, it will be resolved soon. Regards, Ganesh On Tue, Oct 9, 2018 at 11:14 PM bill paxton < epican.ansible.mail.l...@gmail.com> wrote: > ios_facts failing to populate all

[ansible-project] Re: Issue when backup cisco NXOS " fatal: [*************]: FAILED! => {"msg": "nothing to repeat"}"

2018-08-07 Thread Ganesh Nalawade
Can you please share the output of command in gist # show cdp global | include globally Also please raise a Github issue here with all the relevant details. Regards, Ganesh On Thursday, 5 July 2018 21:09:28 UTC+5:30,

Re: [ansible-project] junos_command

2018-03-30 Thread Ganesh Nalawade
You can use 'include_vars' tasks: - name: include commands include_vars: file: shcmds.yaml - name: Run a set of commands junos_command: commands: "{{ show_commands }}" output: text provider: "{{ netconf }}" register: showcmds $ cat shcmds.yaml --- show_commands: - show

Re: [ansible-project] determining network os type?

2018-03-08 Thread Ganesh Nalawade
ansible_network_os is a reserved variable and need to be set manually. More details can be found here https://docs.ansible.com/ansible/devel/network/user_guide/platform_index.html Regards, Ganesh On Fri, Mar 9, 2018 at 11:17 AM, Marcos Georgopoulos wrote: > Hi, > > There are

[ansible-project] Re: junos_command

2018-02-08 Thread Ganesh Nalawade
> *AnsibleError: ncclient is not installed* Please install ncclient and retry. Command to install ncclient using pip: # pip install ncclient Regards, Ganesh On Friday, 9 February 2018 04:00:01 UTC+5:30, Gennadiy Krokodilov wrote: > > Boker Tov Asaf, did you managed to solve it? > > I have

Re: [ansible-project] cannot load cliconf for network os sros

2018-01-11 Thread Ganesh Nalawade
Can you please share the playbook you are running and contents of the log file? Regards, Ganesh On Thu, Jan 11, 2018 at 9:31 PM, Daniel Heffner wrote: > I've run into a problem when trying to use the sros_command module >

Re: [ansible-project] network_cli.py help

2017-09-23 Thread Ganesh Nalawade
If I understand the question correctly you want to access port value within network_cli.py, if yes you can do it by accessing self._play_context.port Regards, Ganesh On Sat, Sep 23, 2017 at 4:42 AM, wrote: > Would anyone happen to know if the ansible_port variable is

[ansible-project] Re: Aggregates in network modules

2017-09-21 Thread Ganesh Nalawade
ios_logging module does not support purge as of now, as you figured it out this is a feature under development. Also, the way currently aggregate works is subject to change in future as there are ongoing discussions to implement this using Ansible loops (something similar to with_*). Stay

[ansible-project] Re: fatal: [XXXX]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell.

2017-09-20 Thread Ganesh Nalawade
Can you please re-try this on the released version of 2.4 and check if you are still seeing this issue. Regards, Ganesh On Wednesday, 23 August 2017 07:18:02 UTC+5:30, Sunil6057 wrote: > > Help... > > On Monday, August 14, 2017 at 10:52:45 AM UTC-5, Sunil6057 wrote: >> >> Hi >>

Re: [ansible-project] can ansible gather info on network different devices?

2017-09-19 Thread Ganesh Nalawade
Please refer this link http://docs.ansible.com/ansible/latest/list_of_network_modules.html for the list of available network modules. Use *_facts modules based on platform (eg: ios_facts, junos_facts) which will fetch device information that you are looking for. Regards, Ganesh On Sun, Sep 17,

Re: [ansible-project] Re: How to login to Avocent servers and run ansible playbooks on the Network devices which are connected serially

2017-09-19 Thread Ganesh Nalawade
Ansible does not support serial console connection. However, there are other ways to bootstrap a working ssh connection to the network device and that can be managed by Ansible. One possible way is you can use pyserial to write a script that connects to the

Re: [ansible-project] Is the CISCO--- IOS_STATIC_ROUTE module working ok for you?

2017-09-18 Thread Ganesh Nalawade
It seems Python `ipaddress` library required for `ios_static_module` is not installed in your environment. Can you please install it and retry. Also, I think the error message should be properly handled in `ios_static_module` in case of prerequisite library is not installed. Can you please

Re: [ansible-project] Cisco NXOS : Parsing SNMP trap hosts from command output

2017-07-19 Thread Ganesh Nalawade
If I understand this correctly, you want to run 2nd task (snmp update) based on the output of 1st task (get current snmp hosts). One way to do this is to use 'register' keyword to store the output of 1st task and use 'when' conditional to run the second task. - name: get current snmp hosts

Re: [ansible-project] Problems updating Junos configuration with new modules/versions

2017-06-28 Thread Ganesh Nalawade
As per logs, value of `src` parameter is null "src": null It seems there is an issue in your playbook. Can you please make below change in the playbook and retry. junos_config: provider: "{{ junos_creds }}" src: "{{ junos_conf }}" update: override comment: Test pushed by ansible

Re: [ansible-project] Analysing large XML objects

2017-05-30 Thread Ganesh Nalawade
Here are some sample examples of applying conditional check for values in xml hierarchy. https://github.com/ansible/ansible/blob/devel/test/integration/targets/junos_command/tests/netconf_xml/equal.yaml

Re: [ansible-project] Re: How to use regex to match a response using the expect module

2017-03-01 Thread Ganesh Nalawade
Hi David, Changing the yml file as below at least loads the file. As per docs the key under responses is python regex so I think it should work. - name: Access member 0 expect: command: 'request session member 0' responses: