title: VARIABLE IS NOT DEFINED when trying to register output in playbook
body: <p>I'm trying to register a variable with the output to a query of a F5 pool and I'm getting this error:</p>
  
  <pre><code>"&lt;type 'list'&gt;": "VARIABLE IS NOT DEFINED!", 
  </code></pre>
  
  <p>What is that I'm doing wrong?
  Any help appreciated.
  Thanks! </p>
  
  <pre><code>---
  - name: GRAB F5 FACTS
    hosts: f5
    connection: local
    gather_facts: no
    tasks:
      - name: Collect BIG-IP facts
        bigip_device_facts:
          gather_subset: ltm-pools
          provider: "{{ prov }}"
        register: bigip_device_facts
  
      - name: FACTS OUTPUT
        debug:
          var: "{{ item.members | rejectattr('state', 'match', '^present$') | map(attribute='name') | list }}"
        register: jkout
        with_items: "{{ bigip_device_facts.ltm_pools }}" 
        when: item.full_path  == "/Common/mypool"
  
      - name: Set a variable
        debug:
          msg: "jkvar={{ jkout }}"
  </code></pre>