Latest Posts
Docker – Alpine

docker alpine is a linux with all minimum networking files/tools to be able to test quick stuff. docker run -it alpine = how to start it. hostname -i ip address ip address | grep inet ip route ifconfig nslookup traceroute…
Read more
Linux commands

echo $PATH = will show all executable commands path available. export PATH=$PATH:/home/dir/dir = will add this path to the executable path available which “name” = will show the path of the executable “name” man = get in deep help on…
Read more
Expand a Hard Disk with Ubuntu LVM

Found a nice and easy article of how to Expand a Hard Disk with Ubuntu LVM : http://www.geoffstratton.com/expand-hard-disk-ubuntu-lvm So you’re running an Ubuntu server in a virtual machine, and now you need to add 20 GB of disk space to…
Read more
Jinja2 Loops

Example ! #### Script1 #### from __future__ import unicode_literals, print_function from jinja2 import FileSystemLoader, StrictUndefined from jinja2.environment import Environment env = Environment(undefined=StrictUndefined) env.loader = FileSystemLoader([“.”, “./templates/”]) var_interfaces = {} var_template_file = “intf_config1.j2” var_template = env.get_template(var_template_file) var_output = var_template.render(**var_interfaces) print(var_output) ####…
Read more
Jinja2 Environments

So to be able to call different files/template that are not in the current directory, from __future__ import unicode_literals, print_function from jinja2 import FileSystemLoader, StrictUndefined from jinja2.environment import Environment #env = Environment() <— load the default environment #env =…
Read more
Aruba Cheat Sheet ! Cisco / Aruba OS/CX
Protected: Automation
There is no excerpt because this is a protected post.
Jinja2 Base Template

So in the following example we import template from jinja2 and then we define our template : text1 and bgp_config, Then we use the variable j2_template = and we call the template that we want : in this example config1….
Read more
Jinja2 Structures

Variables : var: {{ variable_name_here }} Conditionals : ( you can have nested conditional too in your template ) {% if var ==’value’ %} text here {% elif var ==’other value’ %} text here {% else %} text here {%…
Read more