title: List all ansible hosts from inventory file for a task
body: <p>For a backup I need to iterate over all hosts in my inventory file to be sure that the backup destination exists. My structure looks like</p>
  
  <pre><code>/var/backups/
              example.com/
              sub.example.com/
  </code></pre>
  
  <p><strong>So I need a (built-in) variable/method to list all hosts from inventory file, not only a single group.</strong></p>
  
  <p>For groups its look like this</p>
  
  <pre><code>- name: ensure backup directories are present
    action: file path=/var/backups/{{ item }} state=directory
            owner=backup group=backup mode=0700
    with_items: groups['group_name']
    tags:
      - backup
  </code></pre>