I have the following in an ansible template.

```
           {% if value.http_requests is defined %}
            {% for http_request in value.http_requests %}
http-request    {{ http_request }}
            {% endfor %}
        {% endif %}

```

http\_requests is usually defined in the playbook like so:

```
   http_requests:
      - randomhttprequest

```

If the variable is defined but the list is empty, then the template will show http-request with no value.

I'm struggling to find a way to fail the playbook even if http\_requests list is left empty like this

```
   http_requests:
      -
      -

```

I've tried using length and not none but I cant seem to make it work.