Re: [ansible-project] Re: Viptela Support on Ansible

2019-08-01 Thread Peter Sprygada
https://github.com/ciscodevnet/ansible-viptela On Thu, Aug 1, 2019 at 3:41 PM 'Tcpip' via Ansible Project wrote: > > Hello, > > How can I configure the playbooks to work with multi-tenant. > > THanks. > > El jueves, 26 de julio de 2018, 9:47:04 (UTC-3), Eugene Wong escribió: >> >> Hi j-16375, >>

Re: [ansible-project] manage linux system policy routing?

2018-05-21 Thread Peter Sprygada
net_static_route is designed to be used with traditional routers and switches and will not work with Linux hosts On Mon, May 21, 2018 at 6:08 AM, cava cavamagie wrote: > i'm aunable to use the module net_static_route > other ways? > > -- > You received this message because

Re: [ansible-project] Re: Issues connecting when using the ios_facts module

2018-05-18 Thread Peter Sprygada
Few things that need to be corrected here 1) use connection=network_cli 2) set the ansible_network_os=asa 3) use the asa_facts module, not ios_facts http://docs.ansible.com/ansible/latest/network/index.html On Fri, May 18, 2018 at 4:18 PM, Matt Hickok wrote:

Re: [ansible-project] Command timeout adjustment in 2.5 with new network modules?

2018-03-27 Thread Peter Sprygada
For network_cli connections, we do not support a per command timeout today. This is something we are looking at adding but as of 2.5, there is only the global timeout parameter. On Mon, Mar 26, 2018 at 4:18 AM 'Scott Pettit' via Ansible Project < ansible-project@googlegroups.com> wrote: >

Re: [ansible-project] napalm-ansible...NXOS

2018-03-21 Thread Peter Sprygada
The NAPALM library does not support connecting to NXOS devices using SSH, only NXAPI.If you want to connect using SSH, I would recommend using the nxos core modules instead. On Tue, Mar 20, 2018 at 11:01 PM Sunil6057 wrote: > hi > > --- > - hosts: leaf > connection:

Re: [ansible-project] Unable to Open Shell

2017-11-28 Thread Peter Sprygada
That looks like a paramiko issue. Could you open an issue at github.com/ansible/ansible and provide this output along with the output from `pip freeze`? From there we can further troubleshoot the bug. On Tue, Nov 28, 2017 at 9:57 AM Lukas M wrote: > Yes, I looked

Re: [ansible-project] No output from Cisco router

2017-10-30 Thread Peter Sprygada
run with -v (or -vvv) to see the output of the task on the command line use register to further process the output ( http://docs.ansible.com/ansible/latest/playbooks_variables.html#registered-variables ) On Thu, Oct 26, 2017 at 9:41 AM, wrote: > > > On Thursday,

Re: [ansible-project] Telnet Module inside 2.4

2017-10-18 Thread Peter Sprygada
There are no plans to add prompt introspection and response to the telnet module. It could be an opportunity for someone to take on as a project if so desired. On Wed, Oct 18, 2017 at 4:20 PM, Rodrigo wrote: > Hello Everyone, > > Is there any idea for this subject? >

Re: [ansible-project] Queries regarding IOS_CONFIG module

2017-10-12 Thread Peter Sprygada
Hi Harkanwal, 1. example below ios_config: lines: - logging ... - logging size .. parents: - archive - log config 2. yes, it uses the same connection for multiple tasks by default 3. the configuration lines in ios_config must match the same as the running config, do not use

Re: [ansible-project] Re: Help with Basic IOS Command module

2017-05-08 Thread Peter Sprygada
Hi Sergey, can you provide more details about what isn't working in py3.5? On Sat, May 6, 2017 at 8:19 AM, wrote: > Hi Bain, > > It seems the ios_command module doesn't work with Python3.5. Try running > it with Python2.7. > > Regards, > Sergey > > > On Friday, 5 May

Re: [ansible-project] Help with Basic IOS Command module

2017-05-05 Thread Peter Sprygada
Hi bain, Looks like your missing connection: local in your playbook. See updated below: - hosts: all gather_facts: no tasks: - name: ios command ios_command: connection: local commands: - terminal length 0 - show interfaces On Thu, May 4, 2017 at

Re: [ansible-project] junos_command

2017-04-25 Thread Peter Sprygada
HI Asif, junos_command requires netconf to be enabled on the remote device. On Tue, Apr 25, 2017 at 3:31 PM, Asif Iqbal wrote: > I am failing to make junos_command work > > 2017-04-25 15:28:49,152 p=4058 u=user | PLAY [sdwan-routers] >

Re: [ansible-project] Network Modules - dealing with Interactive prompts

2017-03-14 Thread Peter Sprygada
ible 2.2.0.0 > > On Sunday, March 12, 2017 at 8:23:09 PM UTC, Peter Sprygada wrote: >> >> which version of ansible are you running? >> >> On Fri, Mar 10, 2017 at 9:29 AM, <jb79...@gmail.com> wrote: >> >>> Hello, >>> >>> What is the best

Re: [ansible-project] Network Modules - dealing with Interactive prompts

2017-03-12 Thread Peter Sprygada
which version of ansible are you running? On Fri, Mar 10, 2017 at 9:29 AM, wrote: > Hello, > > What is the best approach to dealing with interactive commands. I am > attempting to use ansible to download a software file to a switch using a > "copy >

Re: [ansible-project] Re: junos_template in Ansible 2.1

2017-03-12 Thread Peter Sprygada
only include configuration statements in your file (config.j2), not cli commands. remove the configure and commit statements On Sun, Mar 12, 2017 at 11:39 AM, Dat Dao wrote: > Hi IAN, > I am a newbie in ansible sector, I wrote the playbook in which I used >

Re: [ansible-project] ios_config: match confusion

2017-02-15 Thread Peter Sprygada
match=line * Simple line matching against the running config with respect to context (parents). If the line is in the config, then nothing will be done. If the line isn't in the config, it will be added match=none * Ignore the running config all together and push the config lines into the

Re: [ansible-project] ios_config module questions

2017-01-18 Thread Peter Sprygada
Hi Stijn: For the host argument use the following syntax: host: "{{ inventory_hostname }}" That will replace the value for host based on the node defined in inventory. For the using the env var you need to set that in your shell environment, not the inventory file. If you want to keep the

Re: [ansible-project] ios_command does not seem to be working

2017-01-18 Thread Peter Sprygada
What version of Ansible are you running? On Wed, Jan 18, 2017 at 4:05 PM, Mohamed Lrhazi wrote: > Hello, > > am trying ansible and ios_command module for the first time... it seems as > if ansible is trying to execute normal unix commands instead of ios... what > am I missing?

Re: [ansible-project] Invalid input detected at '^' marker (Ansible 2.2 using ios_config)

2017-01-06 Thread Peter Sprygada
hm thats strange. i dont see anything glaringly obvious. I see it fails to execute the command "configure terminal". What version of IOS are you running against? Is AAA involved? Can you replicate the steps manually when logged via the same user/password combination? On Tue, Dec 27, 2016 at

Re: [ansible-project] ios_command module fails to enter previledge mode

2017-01-06 Thread Peter Sprygada
Use iosxr_command not ios_command when configuring IOS-XR devices On Wed, Dec 21, 2016 at 3:09 PM, Eliezer Rodriguez wrote: > Hi, > > I'm using the ios_command and it seems it's not entering privileged mode, > the traceback shows it issuing a "term length 0" commands that

Re: [ansible-project] ENCOUNTERING MODULE FAILURE Error while using IOS_template module

2017-01-06 Thread Peter Sprygada
template files need to be structured as config files. shubham.j2 should look like this: interface FastEthernet0/0 ip address 1.1.1.1 255.255.255.0 no shutdown With indents... no need to add configure terminal as the module will handle that for you On Fri, Jan 6, 2017 at 4:48 AM,

Re: [ansible-project] trouble using sros modules to log in with a specific user

2016-12-12 Thread Peter Sprygada
Hi Nick, Not sure if you figure this out yet or not but you need to add connection: local to your playbook. Your updated playbook should look like this: https://gist.github.com/privateip/2482751b36b30eb60151e94e16c905ea Peter On Tue, Nov 29, 2016 at 7:47 PM, Nick Keeling

Re: [ansible-project] Re: How to save stdout_lines to a file without losing the newlines

2016-11-07 Thread Peter Sprygada
Write the stdout var instead. - name: Saving "{{ item }}" into local file local_action: copy content="{{ table.stdout[0] }}" dest="{{ dest_file }}" On Mon, Nov 7, 2016 at 12:10 PM, jean-christophe manciot < actionmysti...@gmail.com> wrote: > I suppose it depends on how the data are returned

Re: [ansible-project] Running ios_template on mac osx under virtualenv

2016-10-17 Thread Peter Sprygada
You are most likely picking up the wrong Python interpreter. Add the following line to your inventory file: [all:vars] ansible_python_interpreter=python On Sun, Oct 16, 2016 at 12:30 AM, Dustin Dean wrote: > Hello Everyone, > > I am getting the following error below when

Re: [ansible-project] Module Paths for junos-eznc

2016-10-13 Thread Peter Sprygada
Are you attempting to run Ansible in a virtualenv? On Tue, Oct 11, 2016 at 3:16 PM, Zod wrote: > Trying to setup Ansible on Mac OS X 10.10.3 > Have ansible 2.1.1.0 python 2.7.12 > installed junos-eznc > Testing uploading a conf file to a juniper device and getting: >

Re: [ansible-project] How to configure Vyatta router using ansible 2.0 version?

2016-10-06 Thread Peter Sprygada
The answer today is to use 2.2. There is no plans to backport the vyos modules to 2.0 On Wed, Oct 5, 2016 at 7:11 AM, Mick st john wrote: > I am trying to configure vyatta router using modules provided by ansible > 2.0 version. However, the commands such as

Re: [ansible-project] Network switch module questions

2016-10-04 Thread Peter Sprygada
Hi Don, Ansible 2.2 adds support for Dell OS6, OS9 (I believe this is the old Force10 stuff) and OS10. Please see the modules here: https://github.com/ansible/ansible-modules-core/tree/devel/network/dellos9 Creating modules is not difficult. See here for details:

Re: [ansible-project] Re: Cisco IOS backup and write to file with timestamp

2016-10-01 Thread Peter Sprygada
Hi James, This should accomplish what you are trying to do: https://gist.github.com/privateip/d0fd3c6459c5e1a4c1f9dceeb018b109 Peter On Fri, Sep 30, 2016 at 8:44 PM, James Baird wrote: > I looked into going that route but the concern is that is only available > in 2.2

Re: [ansible-project] ios clear command expect confirm

2016-09-22 Thread Peter Sprygada
In 2.1 there is no way to handle this. We added a new capability in 2.2 (current devel branch) that will allow you to do this. The new task would look like this: - name: Clear counters connection: local tasks: - ios_command: host: "{{ inventory_hostname }}" commands:

Re: [ansible-project] How Network Modules using openssh controlpersist feature?

2016-09-22 Thread Peter Sprygada
gt; can't use module_util/shell.y & basic.y, I have to write myself basc > library? * > > > *Is there any other featuca to avoid SSH authentication for each task?* > > 在 2016年9月21日星期三 UTC+8上午3:26:33,Peter Sprygada写道: >> >> No, there is no support for ControlPersist (o

Re: [ansible-project] How do I use openSSH instead of paramiko (i.e. no connection:local) for IOS modules?

2016-09-22 Thread Peter Sprygada
The short answer is you don't. Traditional network devices that dump an authenticated session to the "CLI" effectively prevent you from being able to use OpenSSH as a programmable transport in the way that is implemented for other systems. WRT point #2. SSH connections being made by network

Re: [ansible-project] How Network Modules using openssh controlpersist feature?

2016-09-20 Thread Peter Sprygada
No, there is no support for ControlPersist (or similar) in the paramiko library. On Tue, Sep 20, 2016 at 9:48 AM, wrote: > I find that the Network Modules must use paramiko, does paramiko support > openssh ControlPersist similar feature? > > > building ssh connection by

Re: [ansible-project] Re: Anyone using ansible to manage nexus and ios-xr devices?

2016-09-19 Thread Peter Sprygada
HI Ryan, There are a number of organizations that are currently using both nxos and iosxr modules in production today. We went through a fairly significant refactor for 2.2 which means we are presently tracking down lots of bugs but the code base is stabilizing quickly and is definitely the

Re: [ansible-project] Unable to insert sshkey with nxos_command in Ansible 2.1

2016-09-18 Thread Peter Sprygada
Strange, I just tested with the the stable-2.1 branch and I am not seeing these issues. Both Cli and Nxapi transports are working just fine. Could you provide the output of both "ansible --version" as well as "show version" from your device? On Sat, Sep 17, 2016 at 1:10 PM, Steven Carter

Re: [ansible-project] Problems with NXOS Modules in Ansible 2.2

2016-09-16 Thread Peter Sprygada
That looks like a bug in the module... would you mind filing an issue at http://github.com/ansible/ansible-modules/core with this information so we can track it? On Fri, Sep 16, 2016 at 12:38 PM, Steven Carter wrote: > When I run: > >- name: Configure the port channels

Re: [ansible-project] iosxr_config load config question

2016-09-13 Thread Peter Sprygada
Hi Radoslav, Can you post the output of ansible --version? One of two things is happening here: 1) you are not running Ansible from source (the src argument is being added in the upcoming 2.2 release) 2) you are running from source but the module cannot find the file "fabric.cfg". If you are

Re: [ansible-project] Re: Simple cisco IOS show version

2016-09-02 Thread Peter Sprygada
Hi Valerie, Since network devices such as IOS do not provide a shell environment nor the ability to download and run arbitrary executables, we are fairly constrained from using the current connection plugin module implemented in core. So in order to build modules that work with network devices,

Re: [ansible-project] ansible 2.2.0 - ios_facts module

2016-08-29 Thread Peter Sprygada
Hi Rukka, See sample playbook here: https://gist.github.com/privateip/f473d9ce25dd699b14c9987264159616 On Mon, Aug 29, 2016 at 5:23 AM, Rukka Pal wrote: > I am a newbie and would like to use Ansible to automate network operation > tasks, right now I am only interested in

Re: [ansible-project] stdout looks empty, but 'when' thinks it isn't?

2016-08-23 Thread Peter Sprygada
Also, I noticed you are using ios_command to send configuration statements. Please switch to using ios_config. In 2.2, ios_command will no longer allow you to send configuration commands On Tue, Aug 23, 2016 at 5:49 AM, 'Steve Kersley' via Ansible Project < ansible-project@googlegroups.com>

Re: [ansible-project] Re: ansible 2.0.1.0 run show version with Cisco ASA-55x0

2016-08-11 Thread Peter Sprygada
is working with the latest. On Thu, Aug 11, 2016 at 2:01 PM, jean-christophe manciot < actionmysti...@gmail.com> wrote: > > @Tony Reveal > @ Peter Sprygada > Tony is right, I've just tried the asa_command and experienced the same > issue: > > TASK [asa_pull_config : Fetc

Re: [ansible-project] Re: Simple cisco IOS show version

2016-08-10 Thread Peter Sprygada
See example here: https://gist.github.com/privateip/11b042e569585ee9248a On Wed, Aug 10, 2016 at 11:12 AM, pixel fairy wrote: > start with > > - hosts: routers > vars: > ... > tasks: > ... > > > > On Wednesday, August 10, 2016 at 7:32:23 AM UTC-7, Bharath

Re: [ansible-project] Re: ansible 2.0.1.0 run show version with Cisco ASA-55x0

2016-08-09 Thread Peter Sprygada
Currently that is the case. The asa_* modules were added last month and will be part of the Ansible 2.2 release later this year. On Tue, Aug 9, 2016 at 11:21 AM, Tony R wrote: > Yes I see the instructions on how to install. I've done the install of > the latest release from

Re: [ansible-project] Re: ansible 2.0.1.0 run show version with Cisco ASA-55x0

2016-08-09 Thread Peter Sprygada
can you paste a copy of ansible --version into this thread? I suspect you are not running the latest version from devel On Mon, Aug 8, 2016 at 12:35 PM, Tony R wrote: > OK, any other ideas? I cloned the repository. I edited ansible.cfg. I > also tried the --module-path

Re: [ansible-project] Re: ansible 2.0.1.0 run show version with Cisco ASA-55x0

2016-08-03 Thread Peter Sprygada
and switches. The appropriate command for an > ASA is "terminal pager 0". > > > On Friday, July 22, 2016 at 2:01:14 PM UTC-5, Peter Sprygada wrote: >> >> There are now ASA specific modules available in extras ( >> https://github.com/ansible/ansible-modules-ext

Re: [ansible-project] Network Modules Parents: as a list

2016-08-02 Thread Peter Sprygada
I think there is a little confusion here. Parents refers to hierarchy in the configuration file but what you have described here is separate blocks. Your example playbook would try to build the config as such: interface GigabitEthernet1/0/2 interface GigabitEthernet1/0/30 switchport

Re: [ansible-project] Re: ansible 2.0.1.0 run show version with Cisco ASA-55x0

2016-07-22 Thread Peter Sprygada
There are now ASA specific modules available in extras ( https://github.com/ansible/ansible-modules-extras/tree/devel/network/asa) I would recommend using those for management of ASA devices. On Fri, Jul 22, 2016 at 12:25 PM, Tony Reveal wrote: > Did you ever find a fix for

Re: [ansible-project] Stdout processing

2016-07-19 Thread Peter Sprygada
Use a registered variable to access the return data. See example here: https://gist.github.com/privateip/6d3c2eb6a7301a4d20eda17af2b19be0 More about registered variables here: http://docs.ansible.com/ansible/playbooks_variables.html#sts=Registered Variables%C2%B6 On Mon, Jul 18, 2016 at 8:52

Re: [ansible-project] Which Cisco module to configure interfaces?

2016-07-17 Thread Peter Sprygada
Kyle, Take a look here: https://gist.github.com/privateip/a83443dfe301255fa4648933e8ab7f61 Peter On Tue, Jul 12, 2016 at 6:15 PM, Kyle White wrote: > Hello all! > > I have been trying to modify my VTY interfaces on all the devices in my > district, but do not

Re: [ansible-project] Netconf module for Ansible

2016-06-09 Thread Peter Sprygada
https://github.com/ansible/ansible-modules-extras/tree/devel/network/netconf On 6/8/16 9:43 PM, K. Krishna wrote: Hi, Is there a generic Netconf module support ? Is there any plan to add such as module ? Thanks, Krishna -- You received this message because you are subscribed to the Google

Re: [ansible-project] ios_template, nxos_template breaking order of src config

2016-06-08 Thread Peter Sprygada
ios_template and nxos_template work by reading in the input file, parsing it and comparing it against a parsed copy of the running config of the network device. In order for the template module to work effectively, the input file must match the same block syntax as the target device. Since

[ansible-project] No Networking Working Group IRC Meeting today

2016-06-01 Thread Peter Sprygada
We will resume at our regular time next week. -- 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

Re: [ansible-project] Ansible 2.2 ios modules are failing with message "Failed to connect to the host via ssh."

2016-05-25 Thread Peter Sprygada
Add connection: local to your playbook On 5/24/16 1:19 PM, davis mathew kuriakose wrote: I'm not able to run ios_command module in Ansible 2.1 for executing commands on my cisco routers. I've written a playbook for testing ios_command module on cisco routers. Following is the playbook I

Re: [ansible-project] ios_template making changes when router config already exists

2016-05-18 Thread Peter Sprygada
ahh thanks for the reminder... will take a look at it this week yet On Tue, May 17, 2016 at 11:44 PM, Luke Russell <lukeruss...@hotmail.com.au> wrote: > Hi Peter, > > Is there any follow up on this? Do you need anything further? > > > On Friday, April 15, 2016 at 1

Re: [ansible-project] Hosts file and ansible.cfg for Cisco IOS

2016-04-26 Thread Peter Sprygada
Take a look here for an example... https://gist.github.com/privateip/11b042e569585ee9248a On Tue, Apr 26, 2016 at 4:41 AM, Iñigo Esteban Oleaga < i.esteban.ole...@gmail.com> wrote: > Hi everyone, > > I am completely new with Ansible and I haven't been able yet to do nothing > with my Cisco test

Re: [ansible-project] ios_template making changes when router config already exists

2016-04-15 Thread Peter Sprygada
Hi Luke, We don't actually screen scrape the configuration in this case. Can you post the full playbook via a gist? (or at least the full task?) On Wed, Apr 13, 2016 at 8:45 PM, Luke Russell wrote: > I am using ios_template to deploy some DMVPN tunnels. For some

Re: [ansible-project] Questions about Ansible NXOS command

2016-04-01 Thread Peter Sprygada
You need to pass the required arguments to the module in order for it to run properly. Below is an example of running Ansible to collect the output from show running-config. ansible -m nxos_command -a "host=nxos01 username=admin password=admin commands='show running-config'" localhost

Re: [ansible-project] Re: Error handling in ios_config module

2016-03-29 Thread Peter Sprygada
to handle ACLs from high level perspective. > > BR, > > Uros > > > Dne torek, 29. marec 2016 01.25.44 UTC+2 je oseba Peter Sprygada napisala: >> >> Its a bug in ios_config not properly handling the return prompt. Should >> have a fix committed soon to address t

Re: [ansible-project] Re: Error handling in ios_config module

2016-03-28 Thread Peter Sprygada
Its a bug in ios_config not properly handling the return prompt. Should have a fix committed soon to address this On Mon, Mar 28, 2016 at 3:55 PM, Uroš Bajželj wrote: > Hello > > Thanks for the answer. I tried your suggested solution but it does not > help. > > The

Re: [ansible-project] Re: eos_command module waitfor - IP address in json structure

2016-03-23 Thread Peter Sprygada
ansible)[ansible-eos]$ ansible-playbook route.yaml >> >> PLAY [veos01] >> ** >> >> TASK [eos_command] >> * >> ok: [veos01] >> >> PLAY RECAP >> **

Re: [ansible-project] Re: eos_command module waitfor - IP address in json structure

2016-03-23 Thread Peter Sprygada
[veos01] PLAY RECAP * veos01 : ok=1changed=0unreachable=0failed=0 On Wed, Mar 23, 2016 at 2:39 AM, Peter Sprygada <pspryg...@ansible.com> wrote: > Ignore the request for filing an issue, I committed a change that shoul

Re: [ansible-project] Re: eos_command module waitfor - IP address in json structure

2016-03-23 Thread Peter Sprygada
Ignore the request for filing an issue, I committed a change that should fix this problem. The fix is available for testing in ansible/ansible devel On Tue, Mar 22, 2016 at 4:25 PM, Peter Sprygada <pspryg...@ansible.com> wrote: > Thats a bug... could you file an issue at > github

Re: [ansible-project] Re: eos_command module waitfor - IP address in json structure

2016-03-22 Thread Peter Sprygada
Thats a bug... could you file an issue at github.com/ansible/ansible-modules-core please? On Tue, Mar 22, 2016 at 2:17 PM, Martin Baro wrote: > Hi Uditha, > > Thanks for the reply. > I've simplified the problem a bit (just removed the variable) and with > removing the

Re: [ansible-project] action_plugin/ vs library/ module

2016-01-22 Thread Peter Sprygada
>From the sounds of it, developing a callback might be more appropriate. http://docs.ansible.com/ansible/developing_plugins.html#callbacks On Fri, Jan 22, 2016 at 1:13 PM, Mike Biancaniello wrote: > So, it looks like, in my case, I'll want an action plugin since I don't >

[ansible-project] Re: [ansible-devel] Updating an object that exists within ansible_facts across modules

2015-12-20 Thread Peter Sprygada
Hi Jason, No way to do what you are asking for today. You would have to build a "running fact" in the playbook to achieve this. I think the better and more preferred way would be to prepend your facts (nxos_neighbors, nxos_interfaces, etc). Peter On Sun, Dec 20, 2015 at 7:52 AM, Jason Edelman