summaryrefslogtreecommitdiffhomepage
path: root/ansible.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'ansible.html.markdown')
-rw-r--r--ansible.html.markdown16
1 files changed, 16 insertions, 0 deletions
diff --git a/ansible.html.markdown b/ansible.html.markdown
index e4023e5a..bca1331c 100644
--- a/ansible.html.markdown
+++ b/ansible.html.markdown
@@ -320,6 +320,8 @@ You can tag a task, role (and its tasks), include, etc, and then run only the ta
--skip-tags can be used to exclude a block of code
--list-tags to list available tags
+[Read more](http://docs.ansible.com/ansible/latest/playbooks_tags.html)
+
#### LIMIT
You can limit an execution of your tasks to defined hosts
@@ -350,6 +352,20 @@ You can use the jinja in the CLI too
```bash
ansible -m shell -a 'echo {{ my_variable }}` -e 'my_variable=something, playbook_parameter=twentytwo" localhost
```
+In fact - jinja is used to template parts of the playbooks too
+```yml
+#check part of this playbook: playbooks/roles/sys_debug/tasks/debug_time.yml
+- local_action: shell date +'%F %T'
+ register: ts
+ become: False
+ changed_when: False
+
+- name: Timestamp
+ debug: msg="{{ ts.stdout }}"
+ when: ts is defined and ts.stdout is defined
+ become: False
+
+```
#### Jinja2 filters
Junja is powerfull. It has built-in many usefull functions.