Install rmt: pkg.installed: - name: rmt-server include: - rmt.certs Create rmt MariaDB user: mysql.user: - name: rmt - host: localhost - password: {{ pillar['rmt']['db_password'] }} Create rmt database: mysql.database: - name: rmt - users: - "'rmt'@'localhost'" Create rmt.conf: file.managed: - name: /etc/rmt.conf - source: salt://rmt/files/rmt.conf.jinja - template: jinja - user: _rmt - group: root - mode: "0640" Start rmt-server: service.running: - name: rmt-server - enable: True - watch: - file: Create rmt.conf {% for service in pillar['rmt']['stopped_services'] -%} Stopp {{ service }}: service.dead: - name: {{ service }} - enable: False {% endfor %}