Code Snippet

Just another Code Snippet site

Ansible

[Ansible] Loop

Loop with index & length to debug variables : with : {{item.0}} is the index of the item {{item.1}} is the value of the item vars[item.1] is an “eval” version of the item Loop over files :

[Ansible] How-To

Copy template file with filtering (template) Copy file (no filtering) (copy) Copy folder (no filtering) Don’t forget the ‘/’ at the end Execute shell script (shell) or (command) Wait for a “web service” to be up (waif_for) or Include file only if exists (don’t failed if missing) Test if changes have been performed or not […]