Recent posts

Jinja2 Filter Overview

April 18, 2017 | 3 minute read

Reference: Stack Overflow With the pipe character you pass a value to a filter. There are numerous Jinja 2 filters but Ansible brings some additional filters. (Also see Conditionals.) The term filter might be confusing at times because all the filters work very differently. Some for example reduce a result set of a hash/array, some modify cont...

Jinja2 equalto() Test

April 18, 2017 | less than 1 minute read

Reference: Jinja Check if an object has the same value as another object. Example As per the selectattr( )  page, the Jinja equalto( )  Test, as well as the Ansible match( )  and search( )  Tests all work in a similar fashion. Using this dictionary: - hosts: localhost connection: local gather_facts: no vars: network: address...

Jinja2 default() Test

April 18, 2017 | less than 1 minute read

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 | 1 minute read

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 | less than 1 minute read

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...