title: Ansible: ensure directory ownership / permissions across all servers
body: <p>Given a bunch of servers, A..Z, what's the best way of ensuring that all <code>/dir/path</code> directories on these servers (where these directories exist) are set to a certain owner, group and mode?</p>
  
  <p>I can see how to do it for a specific role, e.g.</p>
  
  <pre><code>- name: Add apache vhosts configuration.
    template:
      src: "vhosts.conf.j2"
      dest: "{{ apache_conf_path }}/{{ apache_vhosts_filename }}"
      owner: root
      group: root
      mode: 0644
    notify: restart apache
    when: apache_create_vhosts
  </code></pre>
  
  <p>but how do you do it across a whole range of servers?</p>