Recent posts

Jinja2 default() Test

April 18, 2017

Example #1 Reference: Jinja Syntax: default(value, default_value=u'', boolean=False) Example #1 If the value is undefined it will return the passed default value, otherwise the value of the variable: {{ my_variable|default('my_variable is not defined') }} This will output the value of my_variable  if the variable was defined, otherwise ...

Git Local Overwrite

April 18, 2017

If your local repository is behind that of the remote repository and your locally tracked files differ from those of the remote repository, you will encounter an error. Performing the steps will result in the following: If the locally tracked files exist on the remote repository, the remote files will overwrite the local files. If the loca...

Installing Git on Ubuntu

April 18, 2017

Install git sudo apt-get install git Generating Ubuntu SSH key ssh-keygen Find your SSH key. cd ~/.ssh cat ~/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU GPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3 Pbv7kOdJ/MTyBl...

Ansible vars Lists

April 18, 2017

Lists can be provided to a module through vars specified inside a Playbook or they can be provided directly inside a Task. In the examples below we want to send two “show” commands to the devices. The former example uses a vars  list while the latter defines the list inside of the module call: List inside vars: - name: run show commands hos...

Ansible Variables

April 18, 2017

Using Variables: About Jinja2 Reference: Ansible Ansible allows you to reference variables in your playbooks using the Jinja2 templating system. While you can do a lot of complex things in Jinja, only the basics are things you really need to learn at first. For instance, in a simple template, you can do something like: My amp goes to {{ max_...