Skip to content

Commit

Permalink
when, for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
cherkavi authored Apr 20, 2022
1 parent 23f05a5 commit fb912e0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ quit
debug: msg="{{ lookup('vars', 'ansible_host') }}"
- name: all variables from host
debug: msg="{{ vars }}"
when: run_mode == "debug"
```
## debug command
Expand Down Expand Up @@ -388,9 +389,6 @@ debug msg="my custom message"
shell pwd
```
## conditions "when"
TBD
# error handling, try catch
## stop execution of steps (of playbook) when at least one server will throw error
```yaml
Expand Down Expand Up @@ -454,7 +452,6 @@ file name from path (return 'script.sh')
dest: '{{ destination_folder }}'
flat: yes
tags: deploy

```
## directives for Jinja
Expand All @@ -479,10 +476,10 @@ condition example
{% endif %}
```
## directives for loop, for last, loop last
### directives for loop, for last, loop last
```
[
{% for stream in streams %}
{% for stream in deployment.streams %}
{
"stream": "{{ stream.stream_name }}",
"classN": "{{ stream.class_name }}",
Expand Down

0 comments on commit fb912e0

Please sign in to comment.