Recent posts

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

Ansible vars Lists

April 18, 2017 | less than 1 minute read

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

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

Ansible Variable Persistence

April 18, 2017 | less than 1 minute read

Reference: Stackoverflow set_fact module only sets facts available during a run. For persistent facts, you’ll need to either: Static: define them in one of the following: vars/ group_vars/ host_vars/ Dynamic: Assign them to hosts using your language of choice via Ansible’s Dynamic Inventory: ...

Ansible set_facts

April 18, 2017 | less than 1 minute read

Reference: Ansible This module allows setting new variables. Variables are set on a host-by-host basis just like facts discovered by the setup module. These variables will be available to subsequent plays during an ansible-playbook run, but will not be saved across executions even if you use a fact cache. Per the standard Ansible variabl...