updated config state
This commit is contained in:
parent
05bb86ec53
commit
7ca49ea62c
2
states/config/config.json.j2
Normal file
2
states/config/config.json.j2
Normal file
@ -0,0 +1,2 @@
|
||||
{%- from "config/map.jinja" import config with context -%}
|
||||
{{ config.config|json }}
|
@ -2,5 +2,6 @@
|
||||
config:
|
||||
enabled: true
|
||||
install_dir: "/usr/local/apps/config"
|
||||
filename: "common.ini"
|
||||
ini_filename: "common.ini"
|
||||
json_filename: "common.json"
|
||||
config: {}
|
||||
|
@ -6,14 +6,22 @@ config-dir:
|
||||
- user: root
|
||||
- mode: "0755"
|
||||
|
||||
config-file:
|
||||
config-ini-create:
|
||||
file.managed:
|
||||
- name: {{ config.install_dir }}/{{ config.filename }}
|
||||
- name: {{ config.install_dir }}/{{ config.ini_filename }}
|
||||
- user: root
|
||||
- mode: "0755"
|
||||
|
||||
config-file-config:
|
||||
config-ini-content:
|
||||
ini.options_present:
|
||||
- name: {{ config.install_dir }}/{{ config.filename }}
|
||||
- name: {{ config.install_dir }}/{{ config.ini_filename }}
|
||||
- separator: '='
|
||||
- sections: {{ config.config }}
|
||||
|
||||
config-json-content:
|
||||
file.managed:
|
||||
- name: {{ config.install_dir }}/{{ config.json_filename }}
|
||||
- source: salt://config/config.json.j2
|
||||
- user: root
|
||||
- mode: "0755"
|
||||
- template: jinja
|
||||
|
Loading…
Reference in New Issue
Block a user