title: Looping in hostvars
body: <p>I'm wondering if it is possible to perform a loop in the hostvars folder when using Ansible? </p>
  
  <p>Here is what I've tried but haven't had success in making it work - or is it just not possible to do? </p>
  
  <pre><code>---
  
  list_pool: 'list ltm pool {{ items }}'
  with_items:
      - 'abc123'
      - 'def456'
  </code></pre>
  
  <p>I would use the "list_pool" variable in a playbook afterward:</p>
  
  <pre><code>  - name: List pool
      bigip_command:
        server: "{{ some_server }}"
        user: "{{ some_user }}"
        password: "{{ some_password }}"
        commands: 
          - "{{ list_pool }}"
        validate_certs: no
      delegate_to: localhost
  </code></pre>