Ansible: for each loop

March 29, 2019

Example of how to do a for each (foreach) loop in a task with a predefined dictionary.

Example on Python

for key, value in dictionary.items():
    # do stuff

Example on PHP

foreach ($dictionary as $key => $value) {
    # do stuff
}
Read more

Ansible - Encrypt and Decrypt files

February 28, 2019

Ansible provide an easy way to encrypt or decrypt files to keep sensitive data in our playbooks. For example, you can have a template which has some username and password and you can keep encrypted.

Read more