User Tools

Site Tools


network_stuff:arista:api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network_stuff:arista:api [2015/09/18 19:16] jotasannetwork_stuff:arista:api [2023/11/02 14:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +__**JUNOS API / ANSIBLE**__\\
 +Instructions [[https://github.com/dgjnpr/ansible-template-for-junos|here]]\\
 +[[http://example.com|https://blog.codecentric.de/en/2014/08/jinja2-better-ansible-playbooks-templates/]]
 +
 +Command to generate config:
 +  ansible-playbook -i hosts ex.p.yaml
 +Destination file:
 +  /var/tmp/build/
 +  ansible-template-for-junos]$ cat  /var/tmp/build/switch1.gyron/tmp/main.conf.part  # many times is Here
 +
 +update1: Found how to format ouput of an iterated list with new lines in the output using:
 +  {{ int.iface|join('\n')}} # Check file in "/home/jaime/ansible/ansible-template-for-junos/roles/ex/templatesmain.conf.j2" !
 +
 +
 +
 +----
 +
 __**Arista API**__\\ __**Arista API**__\\
 +
 +[[https://sreeninet.wordpress.com/2015/05/11/ansible-for-arista-eos/|Ansible for Arista]] \\
 +[[http://www.twine-networks.com/blog/posts/7-how-to-junos-host-zone|Ansible in the (Linux) host machine]]
 +
 +First of all we need >Python2.7, pip and setuptools:\\
 +To compile it Python 2.7:\\
 +  tar -xvf Python-2.7.5.tgz
 +  cd Python-2.7.5
 +  ./configure
 +  make
 +  sudo checkinstall
 +
 +Download ansible-devel from github
 +Compile it with 
 +source ./hacking/env-setup \\
 +Newer python versions include pip: [[http://tecadmin.net/install-python-2-7-on-centos-rhel/#]]
 [[https://eos.arista.com/arista-eapi-101/|Arista eAPI 101]] . Several python examples can be found here [[https://eos.arista.com/arista-eapi-101/|Arista eAPI 101]] . Several python examples can be found here
 This is a basic, simple [[https://fredhsu.wordpress.com/2014/02/13/arista-json-eapi-example/|example]].\\ This is a basic, simple [[https://fredhsu.wordpress.com/2014/02/13/arista-json-eapi-example/|example]].\\
Line 15: Line 48:
 \\ \\
 [[https://sreeninet.wordpress.com/2015/05/11/ansible-for-arista-eos/|Ansible for EOS]]\\ [[https://sreeninet.wordpress.com/2015/05/11/ansible-for-arista-eos/|Ansible for EOS]]\\
-[[http://chromaticsites.com/blog/automated-servers-and-deployments-ansible-jenkins]]+[[http://chromaticsites.com/blog/automated-servers-and-deployments-ansible-jenkins]]\\
 - Roles:  “reusable abstractions” as their docs page explains. See more at: http://chromaticsites.com/blog/automated-servers-and-deployments-ansible-jenkins#sthash.i8k9rOHG.dpuf - Roles:  “reusable abstractions” as their docs page explains. See more at: http://chromaticsites.com/blog/automated-servers-and-deployments-ansible-jenkins#sthash.i8k9rOHG.dpuf
  
 - Playbooks - Playbooks
network_stuff/arista/api.1442603812.txt.gz · Last modified: (external edit)