This commit is contained in:
Jonas Forsberg
2021-09-25 16:04:59 +02:00
parent 0a1dbb5971
commit 6638cda6fb
4 changed files with 137 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
---
database:
host: localhost
database: rmt
username: rmt
password: {{ pillar['rmt']['db_password'] }}
adapter: mysql2
encoding: utf8
timeout: 5000
pool: 5
scc:
username: {{ pillar['rmt']['scc']['username'] }}
password: {{ pillar['rmt']['scc']['password'] }}
sync_systems: true
mirroring:
mirror_src: false
verify_rpm_checksums: false
dedup_method: hardlink
http_client:
verbose: false
proxy:
proxy_auth:
proxy_user:
proxy_password:
low_speed_limit: 512
low_speed_time: 120
log_level:
rails: info
web_server:
min_threads: 5
max_threads: 5
workers: 2

View File

@@ -9,4 +9,34 @@ Create rmt MariaDB user:
mysql.user:
- name: rmt
- host: localhost
- password: {{ pillar['rmt']['mysql_password'] }}
- 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 %}