Calling a loop task to filter and construct final json result in Ansible
Sometimes you need to : iterate a payload call an API for each item filtering the json result using json_query returning a final result with all the filtered result With this result you can iterate for another API. This article talk about how to do that using Ansible, json_query filter
Ansible – become_user and include_tasks modification since 2.5
There is a modification since Ansible 2.5 with the way that include_tasks works with become_user
Ansible – Python 2.6 support ends with Ansible 2.7
As announced with Ansible 2.7, python 2.6 will not more supported on the controller host
Ansible – Test variables types
Here is a playbook for understanding the Ansible test with variables types
Ansible – playing with Jinja2 and its whitespace control
Jinja2 templating with Ansible is powerfull and sometimes you could have some headache for positionning the result just where you want to respect a configuration file syntax. Following, I will show you how to manage the whitespace control with Jinja2
Ansible – Modify and join a list
So you have a list with a number of item which are the /data* path where you want to put your hadoop hdfs data and you want to add after each item the end of the path mount point, here is a solution.
Ansible – Using key value of a dict
When you do some things that needs complex data structure, it could be great to acces to the key and value of the complex data structure. You can do it with the lookup magic word.
Ansible – How to use a variable in a variable name
Some times you have to construct the name of a variable to use it. In previous versions of ansible there was a syntax like this one vars[ ansible_hostname + ‘string’ ] Now, since the Ansible 2.5 you have another syntax very useful