title: What commands does salt execute under the hood to achieve desired minion states?
body: <p>Rightfully or wrongly, I am assuming that in order to achieve the declarative config defined in the <code>*.sls</code> files the salt master must execute a sequence of imperative commands on each minion. E.g., for something like</p>
  
  <pre><code>install_docker_1703:
    pkgrepo.managed:
      - humanname: Docker CE Repository
      - name: deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
      - key_url: https://download.docker.com/linux/ubuntu/gpg
      - require_in:
        - pkg: docker-ce
    pkg.installed:
      - name: docker-ce
      - hold: True
      - refresh: True
      - cache_valid_time: 30 # very low value for testing purposes
      - version: '17.03.2*'
  </code></pre>
  
  <p>the sequence of these commands is executed</p>
  
  <pre><code>add-apt-repository &lt;docker-repo&gt;
  apt-get update
  apt-get install docker-ce=17.03.2-xxxxxxx
  </code></pre>
  
  <p>plus some checks to verify and compare the current state to the desired one.</p>
  
  <p>I am having trouble debugging the behavior of salt. In the context of the above example, I'm having trouble verifying, whether the apt cache is updated every time I run the salt master (<code>salt '*' state.apply</code>), or no more frequently than every 30 seconds, or not at all.</p>
  
  <p><strong>How can I output to <code>stdout</code> (or find in some logfile) the exact sequence of commands executed, plus their respective outputs?</strong></p>