title: Call a salt state from another salt state
body: <p>Somewhat new to salt here. I set up salt and managed to get everything working rather nicely. After the setup, I decided to try make small state files and run those from another state file. The main reason being ease of troubleshooting/changing a small file vs. troubleshooting a huge state file. Unfortunately, outside of the top file, I haven't been successful in getting a state to be called from another state. </p>
  
  <p>For example, let's say I have foo.sls and bar.sls, and bar.sls is a state that installs packages properly. I have tried the following.</p>
  
  <pre><code>#foo.sls
  packages:
    state.apply:
      - source: salt://packages/bar.sls
  </code></pre>
  
  <p>Also</p>
  
  <pre><code>#foo.sls
  packages/bar.sls:
    state.apply
  </code></pre>
  
  <p>And also</p>
  
  <pre><code>#foo.sls
  state.apply:
    - source: salt://packages/bar.sls
  </code></pre>
  
  <p>And few others that I'm not remembering right now. </p>
  
  <p>Most times I've tried though, I get an error stating that state.apply is not available, leading me to believe this is either not possible, or I'm going about it wrong.</p>
  
  <p>Can this be done? If so, how? If not, maybe I'll file a feature request for this, as it seems like it could be useful.</p>