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

2018-01-22 Thread Claudia de Luna
Using Ansible ios_facts module Here is a simple playbook to gather ios facts. I took the output and pasted it into one of the may JSON lint/editors on line to easily see the structure and then added a debug statement for the key:value pair I wanted. Version in this case. --- - hosts: cisco

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

2018-01-24 Thread Claudia de Luna
tead of append. > > can we use loop to achieve above task ? > > > > Regards, > *Surjeet Singh* > Technical Specialist – Networks DATA > CCNA, CCNP(R) > Cell : +917838707047 <+91%2078387%2007047> > > To become bigger person,need to walk with bigger Visi

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

2018-01-28 Thread Claudia de Luna
t;%s;" % s) > outfile.write("\n") > > # ...now all row's which were parsed by TextFSM > counter = 0 > for row in fsm_results: > print(row) > for s in row: > outfile.write("%s;" % s) > outfile.write("\n") > counter += 1 > prin

[ansible-project] Re: Help printing out key/value pair from a register?

2018-02-05 Thread Claudia de Luna
Hi ZillaYT, Its sometimes difficult to figure out how to get to specific values that are returned. Some times you have to "deconstruct" it. If you take the output you get when you run your playbook and paste it into something like https://jsoneditoronline.org/ you can start to understand the

[ansible-project] Re: Can someone show a working example of how to iterate over the rows of a csv file?

2018-02-24 Thread Claudia de Luna
Hi Nico, Not sure if this is what you are looking for but for a sample CSV file # CSV File sample.csv host, user, password, comment, 1.1.1.1, claudia, mypassword, the first one 1.1.1.2, elvira, epassword, the second one 1.1.1.3, billy, bpassword, the third one with this playbook sample_csv.yml

Re: [ansible-project] Re: Ansible 2.5.0 Release Candidate 1 is available

2018-02-24 Thread Claudia de Luna
k/user_ > guide/network_best_practices_2.5.html > > On Sat, Feb 24, 2018 at 7:59 AM, Claudia de Luna <delu...@gmail.com> > wrote: > >> Thanks Matt! >> >> In the change log: >> https://github.com/ansible/ansible/blob/devel/CHANGELOG.md#2.5 >> >>

[ansible-project] Re: backing up a cisco device using telnet

2018-02-24 Thread Claudia de Luna
Hi, You can try using the new (as of Ansible 2.4) "preview" telnet module: telnet - Executes a low-down and dirty telnet command http://docs.ansible.com/ansible/2.4/telnet_module.html Make sure your host file entries resolve in DNS or just use the IP. Sample host file group: [cisco]

[ansible-project] Re: Ansible 2.5.0 Release Candidate 1 is available

2018-02-24 Thread Claudia de Luna
Thanks Matt! In the change log: https://github.com/ansible/ansible/blob/devel/CHANGELOG.md#2.5 there is a link to "Network Best Practices for Ansible 2.5" which fails or maybe is just not ready yet. Text: in Changelog: While neither is technically a new plugin, these connections may now be

[ansible-project] Re: HP Procurve switch

2018-02-24 Thread Claudia de Luna
Hi! Unfortunately there is not alot of direct Ansible support for HP Procurves. If you need something quickly, I'd suggest straight up python using netmiko. If you have some time this sounds like a great custom ansible module! https://pynet.twb-tech.com/blog/automation/netmiko.html On

[ansible-project] Re: nxos_acl module

2018-01-22 Thread Claudia de Luna
HI Julien, I confess I've not used this module for ACL management for many of the reasons you note. Also, the idempotency works at the ACL level but the module at the ACE level and that always worried me. I can see myself checking for one ACE and basically turning my ACL into a one line ACL.

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

2018-01-23 Thread Claudia de Luna
textfsm parsing modules. That is my favorite and I've moved most of my parsing scripts to TextFSM these days. Check out the ntc modules from Network to Code (Jason Edelman). http://docs.networktocode.com/en/latest/ntc-ansible%20Modules%20(multi-vendor)/modules_list.html You can use the jinja2 ba

Re: [ansible-project] Re: nxos_acl module

2018-01-23 Thread Claudia de Luna
> wrote: > Interesting way of doing it. > > What do you mean by : > >> *Also, the idempotency works at the ACL level but the module at the ACE >> level and that always worried me* >> > > Thank you for the feedback > > Julien > > > On Monday, Janu

Re: [ansible-project] Re: ios_facts module unable to open shell [SOLVED]

2018-03-07 Thread Claudia de Luna
tty much gets me what I was looking for although getting to this > point drove me pretty crazy for the past few days. I'm new to Ansible but > want to use it heavily in our managed services environment. My particular > plan is to create reports with the output of this play. > > > On Wedne

[ansible-project] Re: ios_facts module unable to open shell

2018-03-07 Thread Claudia de Luna
Hi Otto, What version and model are you trying to gather facts from? -- 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

Re: [ansible-project] Re: backing up a cisco device using telnet

2018-02-27 Thread Claudia de Luna
m also, seeing this on YAML editing file > > > > > > > > On Tuesday, February 27, 2018 at 2:14:32 PM UTC, Claudia de Luna wrote: > >> Also, make sure your playbook is in proper YAML (I suspect your directory >> does exist as you would get an explicit error f

Re: [ansible-project] Re: backing up a cisco device using telnet

2018-02-26 Thread Claudia de Luna
It also looks like your telnet session is failing. One reason for the error below is an incorrect username or password for the device so check your hosts file. TASK [configure new account via Telnet]

Re: [ansible-project] Re: backing up a cisco device using telnet

2018-02-27 Thread Claudia de Luna
onnection=local > [local] > #localhost > [cisco] > 10.101.250.12 port=22 username=admin password=xx# > 10.101.250.12 username=admin password=xx# > > ##[cisco:vars] > ##device_type=cisco_ios > ##username=ansible > ##password=test123 > > > > >

Re: [ansible-project] Re: backing up a cisco device using telnet

2018-02-27 Thread Claudia de Luna
Also, make sure your playbook is in proper YAML (I suspect your directory does exist as you would get an explicit error for that if it did not) --- - hosts: cisco connection: local gather_facts: False ignore_errors: yes On Tue, Feb 27, 2018 at 5:42 AM, Claudia de Luna <delu...@gmail.

[ansible-project] Re: using inventory group name as var?

2019-05-13 Thread Claudia de Luna
Hi Matthew, Not sure if this is what you are looking for but I use the host group name to create a custom directory to store files (basically show command output from network devices). I use the ansible facts group_name list which gives a list of all the groups to which the host belongs. In

[ansible-project] Re: Ansible AWX installation using docker compose

2019-12-06 Thread Claudia de Luna
Hi Rahul, Try here; https://groups.google.com/forum/#!forum/awx-project On Thursday, December 5, 2019 at 11:51:56 PM UTC-8, Rahul Rawat wrote: > > Hi I have install ansible AWX using docker compose. > > Now check process using docker ps command. > > > How i can access application through

[ansible-project] Re: "ONE" inventory question

2020-02-29 Thread Claudia de Luna
HI, You are certainly correct that adding your host file to each repository is not a solution. As I see it you have a few options: 1. Create an environment repository with your host file and your cfg file and anything else you might need and clone your playbook repositories underneath that

[ansible-project] Re: Telnet to network devices

2020-03-01 Thread Claudia de Luna
Hi Ashish, Have you tried the Telnet module? The docs actually include IOS examples: https://docs.ansible.com/ansible/latest/modules/telnet_module.html Sample Playbook: root@f23399314267:/ansible_local/cisco_ios# cat telnet.yml --- - name: Telnet Example hosts: local_lab gather_facts:

Re: [ansible-project] Upgrading 2960x

2020-04-26 Thread Claudia de Luna
I believe Mr. Meier was just sharing an example of a working version of a playbook that does what kanor is trying to do. It also illustrates your point about the ios_commands module wanting a list. [image: ios-command-2020-04-26_05-45-14.png] I found it pretty relevant and am glad he took the

[ansible-project] Re: Check for existing ACI contract between 2 IPs using Ansbile

2020-04-24 Thread Claudia de Luna
Hi Dave, In ACI you would typically do this check at the EPG level (as contracts are between EPGs). Assuming that would help you (but that depends entirely on your design), There are a couple of approaches I can think of: - Query the EPGs - Query the Contract objects (more parsing) Query the

[ansible-project] Re: I am attempting to run ansible-playbook on centos ansible server. However, I get the below failed result. SSH connection and Adhoc commands work fine. Can somebody please assist

2020-04-26 Thread Claudia de Luna
Hi! This is a bit of "bootstrapping" that you need to do with Ansible. You can either set the host_key_checking parameter to false in your ansible.cfg file or make sure log in to your network devices and accept the key prior to running your playbook. #

[ansible-project] Re: Another Ansible Question

2020-03-16 Thread Claudia de Luna
See if this helps at all https://gratuitous-arp.net/ansible-server-in-docker-for-network-engineers/ On Monday, March 16, 2020 at 3:02:18 AM UTC-7, Michael Cooper wrote: > > Hey Guys, > >I am trying to get ansible working on docker. The image that I am > using is ansible/ansible and