title: SaltStack - using mine in pillar to dynamically build list of host names based on grain match
body: <p>I'm having trouble using the salt mine in a pillar to dynamically create a list of hosts based on a grain value match. I don't get any error, I get no output for all hosts. Actually, I can't get any output for mine from the pillar at all even when using the example from the salt docs. I know it isn't an issue with my top file, because I can access all of the other pillar values. My test minion's mine.interval is set to 5. I've refreshed pillar data, and ran mine.update.</p>
  
  <p>Here's an example of my pillar:</p>
  
  <pre><code>mine_functions:
    network.ip_addrs: []
    grains.item:
      - host
      - role
  </code></pre>
  
  <p>My template file that access the mine functions:</p>
  
  <pre><code>#I know this is writing the same list for each match, I'm just doing this for testing and I'll concat the results into a string when I know it works:
      {% for host in salt['mine.get']('roles:web', 'grains.items:host', expr_form='grain') | dictsort() %}
          serverList= {{ host }}
      {% endfor %}
  </code></pre>
  
  <p>Output from CLI:</p>
  
  <pre><code>salt "server.domain.com" mine.get "*" "*"
  server.domain.com:
      ----------
  </code></pre>
  
  <p>How do I get this to work? I get no errors, no output, it just runs smoothly, but nothing is written in the file and I get nothing from the command line. My goal here is to be able to dynamically build a list of servers that match a specific grain to set a configuration value in a config template. Am I down the wrong path here, is there a better way?</p>