Skip to content

Commit

Permalink
Added count and random
Browse files Browse the repository at this point in the history
  • Loading branch information
directdevops committed Dec 31, 2020
1 parent a7ff7dc commit f1489c2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dec20/AdvancedScenarios/jinja2/jinja_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
vars:
course_name: "ANSIBLE"
simple_text: "This is me doing the job"
courses:
- AWS
- Azure
- DevOps
tasks:
- name: print course name
debug:
Expand All @@ -15,4 +19,11 @@
- name: using replace filter
debug:
msg: "{{ simple_text | replace('me', 'us') }}"
- name: print count
debug:
msg: "count of courses = {{ courses | count }}"
- name: print courses
debug:
msg: "{{ courses | random }}"


0 comments on commit f1489c2

Please sign in to comment.