-
Story
-
Resolution: Done
-
Minor
-
RH294 - RHEL9.0-en-2-20221117
-
None
-
5
-
en-US (English)
URL:
Reporter RHNID:
Section: -
Language: en-US (English)||||||||
Workaround:
Description: While we get a couple of examples here of Jinja for loops, the conditional section shows only a single example. I think a couple more if statements could be added.
Consider something like the following.
{# Provide a hint on installed memory #}
Memory details:
{% if ansible_facts['memtotal_mb'] > 2048 %}
Looks like you have more than 2GBs installed.
{% else %}
Less than 2GBs intalled.
{% endif %}
{# CPU arch #}
Processor type: {{ 'Intel' | upper if ansible_architecture == 'x86_64' else 'Uncommon' }}
Also the filter section could use a few different examples. Comparison to the filter commands in Linux such as 'sort', 'tr', etc. could also help students relate to them better.