title: Ansible Lookup Plugin in Group Vars is called multiple times
body: <p>I have written a lookup plugin to fetch passwords from a password storage API. I'm fetching e.g. hosts secrets. To avoid adding the lookup plugin call to each host seperately I just placed it in <code>group_vars/all.yml</code> like so:</p>
  <pre><code>ansible_password: &quot;{{ lookup('some_vars') }}&quot;
  </code></pre>
  <p>When I'm running a playbook (e.g. <code>site-ping.yml</code> which does nothing more than a login and ping) which is limited to only 1 host I still see how the plugin is actually called two times (and therefore two API calls are made).</p>
  <p><code>gather_facts</code> is set to <code>no</code>. If I set it to <code>yes</code> I will actually get 4 lookup plugin calls.</p>
  <p>Why is that so? Are the <code>group_vars</code> in ansible initialized twice at run-time? Where should I place the lookup plugin call to avoid this? Any best-practice?</p>