title: Ansible - Set environment path as inventory variable
body: <p>Osmc media player needs a specific path for playbooks
  <a href="https://github.com/osmc/osmc/issues/319" rel="nofollow noreferrer">https://github.com/osmc/osmc/issues/319</a></p>
  
  <pre><code>environment:
    PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin"
  </code></pre>
  
  <p>I was wondering whether I can set this as an environmental variable in the inventory for those machines, rather than have it in every playbook or create separate playbooks.</p>
  
  <p>In common usage - is that path likely to cause problems for general *nix machines if it is implemented on non-osmc installations?</p>
  
  <p>If you can't set this an an inventory variable:
  Is that just because it's no implemented/ useful to most?
  Or because the inventory has no relation to path - e.g. it's not invoked at that point?</p>
  
  <p>Or is a better way for all of this to have it as a machine specific variable/ task in a role?
  How would that look please?</p>
  
  <p>New to ansible and still trying to get my head round some of the concepts.</p>