Added ansible templating example

This commit is contained in:
Michele Cereda
2022-05-03 19:50:15 +02:00
parent 21d6be6329
commit 5694f9bbe4
2 changed files with 18 additions and 0 deletions

View File

@@ -2,6 +2,14 @@
- hosts: all
tasks:
- name: >-
Get the values of some special variables.
See https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html
for the full list.
debug:
var: "{{ item }}"
with_items: ["ansible_local", "playbook_dir", "role_path"]
- name: >-
Remove empty or false values from a list piping it to 'select()'.
Returns ["string"] from ["", "string", 0, false].