tlu/salt/states/rmt/init.sls

43 lines
764 B
Plaintext
Raw Normal View History

2021-09-25 12:09:55 +00:00
Install rmt:
pkg.installed:
- name: rmt-server
include:
- rmt.certs
Create rmt MariaDB user:
mysql.user:
- name: rmt
- host: localhost
2021-09-25 14:04:59 +00:00
- 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 %}