title: Dealing with relative paths in saltstack for state files and for pillar files
body: <p>I want to use relative paths when including sls files. This approach works when including state files but does not work when including pillar files.</p>
  
  <p>Let's assume I have the following structure on my salt master:</p>
  
  <pre><code>file_roots:
    base:
      - /srv/salt/states
  
  pillar_roots:
    base:
      - /srv/salt/pillars
  </code></pre>
  
  <p>And let's assume I have the following files:</p>
  
  <pre><code>/srv/salt/states/top.sls
  /srv/salt/states/test/
  /srv/salt/states/test/init.sls
  /srv/salt/states/test/test_state.sls
  </code></pre>
  
  <p>In the top.sls file I include the test directory like this:</p>
  
  <pre><code>base:
    '*':
      - test
  </code></pre>
  
  <p>The init.sls file then includes the actual state file like this:</p>
  
  <pre><code>include:
    - .test_state
  </code></pre>
  
  <p>When I call the highstate everything works as expected. Now I use the same logic for pillar data. That means I have the following files:</p>
  
  <pre><code>/srv/salt/pillars/top.sls
  /srv/salt/pillars/test/
  /srv/salt/pillars/test/init.sls
  /srv/salt/pillars/test/test_pillar.sls
  </code></pre>
  
  <p>In the test_pillar.sls file I put one pillar like this:</p>
  
  <pre><code>test_pillar: text
  </code></pre>
  
  <p>The init.sls file looks like this (analogue to the init.sls file above):</p>
  
  <pre><code>include:
    - .test_pillar
  </code></pre>
  
  <p>When I call the highstate now I get the following error message:</p>
  
  <pre><code>Data failed to compile:
  ----------
  Pillar failed to render with the following messages:
  ----------
  Specified SLS '.test_pillar' in environment 'base' is not available on the salt master
  </code></pre>
  
  <p>So I go back to the init.sls file and make the file path absolute:</p>
  
  <pre><code>include:
    - test.test_pillar
  </code></pre>
  
  <p>Now it works.</p>
  
  <p>To make a long story short: salt allows me to use relative paths in the init.sls for the state files but complains when doing the same for the pillar data.</p>
  
  <p>Is this the intended behaviour? Or do I have to use some other syntax maybe?</p>