{% from "tor/map.jinja" import map, osfamily with context %} {%- if osfamily == 'Suse' %} install_torsocks: pkg.installed: - name: torsocks service.running: - name: {{ map.service_torsocks }} - restart: True - enable: True - require: - pkg: install_torsocks {%- endif %} deploy_tor_torsocks: file.managed: - name: {{ map.config_torsocks }} - source: salt://{{ slspath }}/files/ini.jinja - user: root - group: root - mode: 644 - template: jinja - defaults: config: {{ map.torsocks }} - require: {%- if osfamily == 'Suse' %} - pkg: install_torsocks {%- else %} - pkg: install_tor {%- endif %} - watch_in: {%- if osfamily == 'Suse' %} - service: install_torsocks {%- else %} - service: install_tor {%- endif %}