postgresql:
  pkg.installed:
    - pkgs:
      - postgresql-client-9.3
      - pgbouncer
      - stunnel


/var/run/stunnel:
  file.directory:
    - user: root
    - group: root
    - mode: 750
    - require:
      - pkg: postgresql


/etc/stunnel/stunnel.conf:
  file.managed:
    - source: salt://postgresql/configs/stunnel.conf.jinja
    - template: jinja
    - user: root
    - group: root
    - mode: 640
    - require:
      - pkg: postgresql
      - file: /var/run/stunnel

postgresql:
  pkg.installed:
    - pkgs:
      - postgresql-client-9.3
      - pgbouncer
      - stunnel4


/var/run/stunnel:
  file.directory:
    - user: root
    - group: root
    - mode: 750
    - require:
      - pkg: postgresql


/etc/stunnel/stunnel.conf:
  file.managed:
    - source: salt://postgresql/configs/stunnel.conf.jinja
    - template: jinja
    - user: root
    - group: root
    - mode: 640
    - require:
      - pkg: postgresql
      - file: /var/run/stunnel

Include stunnel4 instead of stunnel
Include stunnel4 instead of stunnel

zware/psf-salt,python/psf-salt,zware/psf-salt,zooba/psf-salt,zooba/psf-salt,caktus/psf-salt,zware/psf-salt,python/psf-salt,zooba/psf-salt,zware/psf-salt,dstufft/psf-salt,dstufft/psf-salt,python/psf-salt,caktus/psf-salt,caktus/psf-salt,dstufft/psf-salt,python/psf-salt