summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsirkubax <muszynski@so1.net>2018-01-01 21:31:22 +0100
committersirkubax <muszynski@so1.net>2018-01-01 21:31:22 +0100
commitca0e3475a019cfbe4532ddee6b1d9e5c1191c93c (patch)
tree780d3a3aaa0dc5d8f61b808287ec2b812b6dc328
parent91a81abb7de572b5fb595f641688b75144de5b75 (diff)
update
-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.