title: Unable to apply State files on Salt
body: <p>Having issues applying state files to minions on salt, they're just basic test ones, nothing complicated.</p>
  
  <p>In my master config file I have the following file roots definition:</p>
  
  <pre><code>file_roots:
    base:
      - /srv/salt/
  </code></pre>
  
  <p>My /srv/salt/top.sls file looks like this:</p>
  
  <pre><code>base:
    '*':
      - vim
  </code></pre>
  
  <p>Then at /srv/salt/vim/init.sls I have the following:</p>
  
  <pre><code>vim:
    pkg.installed
  </code></pre>
  
  <p>So, that should be applied to all minions when applied, so I run the following:</p>
  
  <pre><code>sudo salt '*' state.apply
  </code></pre>
  
  <p>I get the following output, and it's not applied, as it seems to not be detecting the top.sls file?</p>
  
  <pre><code>salt-master-1:
  ----------
            ID: states
      Function: no.None
        Result: False
       Comment: No Top file or master_tops data matches found.
       Changes:   
  
  Summary for salt-master-1
  ------------
  Succeeded: 0
  Failed:    1
  ------------
  Total states run:     1
  Total run time:   0.000 ms
  dev-docker-1:
  ----------
            ID: states
      Function: no.None
        Result: False
       Comment: No Top file or master_tops data matches found.
       Changes:   
  
  Summary for dev-docker-1
  ------------
  Succeeded: 0
  Failed:    1
  ------------
  Total states run:     1
  Total run time:   0.000 ms
  ERROR: Minions returned with non-zero exit code
  </code></pre>
  
  <p>If I look at the logs for the minion, dev-docker-1 nothing is logged as an error, all that I see is this.</p>
  
  <pre><code>2018-11-08 18:33:12,993 [salt.minion      :1429][INFO    ][4883] User sudo_salt Executing command state.apply with jid 20181108183312990343
  2018-11-08 18:33:13,015 [salt.minion      :1564][INFO    ][5438] Starting a new job with PID 5438
  2018-11-08 18:33:13,331 [salt.state       :933 ][INFO    ][5438] Loading fresh modules for state activity
  2018-11-08 18:33:13,448 [salt.minion      :1863][INFO    ][5438] Returning information for job: 20181108183312990343
  </code></pre>
  
  <p>Any help greatly appreciated as I'm a bit lost as to why this isn't working . . . </p>
  
  <p><strong><em>Edit 1</em></strong></p>
  
  <p>I have enabled verbose logging on the minion, and I see the following, seems it can't see the top.sls file</p>
  
  <pre><code>[DEBUG   ] Could not find file 'salt://top.sls' in saltenv 'base'
  [DEBUG   ] No contents loaded for saltenv 'base'
  [DEBUG   ] No contents found in top file. If this is not expected, verify that the 'file_roots' specified in 'etc/master' are accessible. The 'file_roots' configuration is: {u'base': []}
  </code></pre>