title: How do I implement optional requisites?
body: <p>I have two .sls state files. One sets up a system service. The other formats and mounts storage volumes.</p>
  
  <p>The system service doesn't need to know or care about its underlying storage; it just writes data to a given directory. Likewise, the state that does the volume setup doesn't need to know or care what's using said volume, and will be reused in other contexts. It seems inappropriate for either .sls to include the other. However, if the intended data directory <em>happens</em> to be a mounted volume, I need to make sure that the mount happens before the service state runs.</p>
  
  <p>The problem: If neither file includes the other, I don't think I can use <code>require</code> or <code>require_in</code>. I can use <code>order: 0</code> in the mounting state, and that will ensure the mount goes first, but that doesn't express a dependency; if the mount state fails, the service will still try to run.</p>
  
  <p>What's the Right Way to handle this case? My aim is to create a requisite if and only if it is relevant, without either sls being dependent on the other's implementation details (or even existence).</p>