title: Proper way to define default variables for all hosts in Ansible
body: <p>There is a definition of <code>[all:vars]</code> in my ansible inventory file as follows:</p>
  
  <pre><code>[all:vars]
  ansible_shell_type=bash
  ansible_user=certain_user
  ansible_ssh_common_args="-o ConnectionAttempts=10"
  </code></pre>
  
  <p>I plan to move such variables into <code>ansible.cfg</code> to set defaults for all hosts. Would it simply work in a similar way or is there any circumstances to consider?
  What else alternatives available to remove <code>[all:vars]</code> from the inventory file?</p>