title: regular expression match in salt-stack
body: <p>I'm rewriting some modules from puppet to saltstack.</p>
  
  <p>In puppet we can use <code>node</code> to specific this part is for this machine,
  for example:</p>
  
  <pre><code>node /william\d+.aws.dev/ {
    # some codes here.. 
  }
  </code></pre>
  
  <p>But in saltstack, it's not that much elegant:</p>
  
  <pre><code>{% if grains['fqdn'] == 'william.aws.dev' %}
    # some codes here..
  {% endif %}
  </code></pre>
  
  <p>and regular expression is not supported. </p>
  
  <p>Is there any way to rewrite it in saltstack using less code?</p>
  
  <hr>
  
  <p><strong>Note</strong> I don't want to use <code>top.sls</code> to define which node using which sls. because it would make the top.sls file too large to maintain.</p>
  
  <p>I just want to define a simple two line in <code>top.sls</code>:</p>
  
  <pre><code>'*':
    - node.*
  </code></pre>
  
  <p>everytime I add some node in salt, I just need to create a new file under the <code>node</code> directory.</p>