title: Salt: install package and run service (name different than package)
body: <p>Currently trying to wrap my head around Salt.</p>
  <p>In essence I'd like to install a package (rpm) and enable and run the service (if the package installed successfully).</p>
  <p>Surprise: The service is called differently than the package.</p>
  <p>Let's say</p>
  <ul>
  <li>the package is called x</li>
  <li>but the (systemd/init) service this package installs is called y</li>
  </ul>
  <p>This does not work</p>
  <pre><code>my_state_id:
    pkg.installed:
      - pkgs:
        - x
    service.running:
      - name: y
      - enable: true
      - require:
        - pkg: x
  </code></pre>
  <p>Result:</p>
  <pre><code>Comment: The following requisites were not found:
                               require:
                                   pkg: x
  </code></pre>
  <p>It looks like I have to write it like this and reference the state and not the package:</p>
  <pre><code>my_state_id:
    pkg.installed:
      - pkgs:
        - x
    service.running:
      - name: y
      - enable: true
      - require:
        - pkg: my_state_id
  </code></pre>
  <p>But: What does <code>require: pkg: my_state_id</code> mean? =D &quot;if the state up to this point didn't fail, then run the current module&quot;?</p>