paulbsd-salt/states/config/init.sls

37 lines
910 B
Plaintext
Raw Permalink Normal View History

2020-07-10 00:58:55 +02:00
---
{%- from "config/map.jinja" import config with context %}
config-dir:
file.directory:
- name: {{ config.install_dir }}
- user: root
- mode: "0755"
2022-01-25 00:16:58 +01:00
config-ini-create:
2020-07-10 00:58:55 +02:00
file.managed:
2022-01-25 00:16:58 +01:00
- name: {{ config.install_dir }}/{{ config.ini_filename }}
2020-07-10 00:58:55 +02:00
- user: root
- mode: "0755"
2023-12-18 19:32:38 +01:00
- replace: False
2020-07-10 00:58:55 +02:00
2022-01-25 00:16:58 +01:00
config-ini-content:
2020-07-10 00:58:55 +02:00
ini.options_present:
2022-01-25 00:16:58 +01:00
- name: {{ config.install_dir }}/{{ config.ini_filename }}
2020-07-10 00:58:55 +02:00
- separator: '='
- sections: {{ config.config }}
2022-01-25 00:16:58 +01:00
config-json-content:
file.managed:
- name: {{ config.install_dir }}/{{ config.json_filename }}
2023-03-11 10:08:26 +01:00
- source: salt://config/templates/config.json.j2
2022-01-25 00:16:58 +01:00
- user: root
- mode: "0755"
- template: jinja
config-yaml-content:
file.managed:
- name: {{ config.install_dir }}/{{ config.yaml_filename }}
2023-03-11 10:08:26 +01:00
- source: salt://config/templates/config.yml.j2
- user: root
- mode: "0755"
- template: jinja