Skip to content

Commit 274e50b

Browse files
fix(config): rename config file to .conf
1 parent 309f096 commit 274e50b

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

mongodb/clean.sls

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,11 @@ include:
8181
- {{ d.dir.var }}/{{ name }}
8282
- {{ d.dir.service }}/{{ name }}.service
8383
- /Library/LaunchAgents/{{ name if 'name' not in service else service.name }}.plist
84-
- require:
85-
- file: {{ formula }}-clean-prerequisites
84+
# require:
85+
# file: {{ formula }}-clean-prerequisites
8686
cmd.run:
8787
- name: systemctl daemon-reload >/dev/null 2>&1 || true
88+
- onlyif: {{ grains.kernel|lower == 'linux' }}
8889
- onchange:
8990
- file: {{ formula }}-{{ comp }}-{{ package }}-{{ name }}-clean-service
9091

mongodb/config/clean.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ include:
3737
- names:
3838
{%- if 'service' in software and software['service'] is mapping %}
3939
{%- set servicename = name if 'service' not in software else software.service.name %}
40-
- {{ d.dir.etc }}/{{ servicename|replace('org.mongo.mongodb.', '') }}.yml
40+
- {{ d.dir.etc }}/{{ servicename|replace('org.mongo.mongodb.', '') }}.conf
4141
{%- endif %}
4242
{%- if 'config_file' in software and 'config' in software and software['config'] is mapping %}
4343
- {{ software['config_file'] }}

mongodb/config/file.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ include:
3333
3434
{{ formula }}-config-file-{{ servicename }}-file-managed:
3535
file.managed:
36-
- name: {{ d.dir.etc }}/{{ servicename|replace('org.mongo.mongodb.', '') }}.yml
36+
- name: {{ d.dir.etc }}/{{ servicename|replace('org.mongo.mongodb.', '') }}.conf
3737
- source: {{ files_switch(['config.yml.jinja'],
3838
lookup=formula ~ '-config-file-' ~ servicename ~ '-file-managed'
3939
)

mongodb/files/default/macos.plist.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
</array>
1313
<key>RunAtLoad</key>
1414
<true/>
15+
<key>UserName</key>
16+
<string>{{ user }}</string>
1517
<key>StandardErrorPath</key>
1618
<string>/dev/null</string>
1719
<key>StandardOutPath</key>

mongodb/install.sls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ include:
7676
{#- NATIVE PACKAGE INSTALL #}
7777
7878
{%- if package == 'native' %}
79-
{%- if d.use_upstream = 'repo' and 'repo' in d.pkg and d.pkg.repo %}
79+
{%- if d.use_upstream == 'repo' and 'repo' in d.pkg and d.pkg.repo %}
8080
pkgrepo.managed:
8181
{{- format_kwargs(d.pkg['repo']) }}
8282
{%- endif %}
@@ -261,6 +261,7 @@ include:
261261
svc: {{ servicename|replace('org.mongo.mongodb.', '') }}
262262
config: {{ software['config_file'] }}
263263
binpath: {{ software['path'] }}
264+
user: {{ d.default.user if 'user' not in software else software['user'] }}
264265
265266
{%- endif %} {# linux/darwin #}
266267
{%- endif %} {# service #}

mongodb/map.jinja

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,18 @@
2020
)
2121
)
2222
)
23-
%}
23+
%}
24+
{%- set d = salt['grains.filter_by']( {'defaults': defaults}, default='defaults', merge=_config) %}
2425

2526
# depreciate two params
2627
{%- if 'software_component_matrix' in d %}
27-
{%- do d.update({ 'components': d.software_component_matrix %}
28+
{%- do d.update({ 'components': d.software_component_matrix }) %}
2829
{%- endif %}
2930
{%- if 'software_package_matrix' in d %}
30-
{%- do d.update({ 'use_upstream': d.software_package_matrix %}
31+
{%- do d.update({ 'use_upstream': d.software_package_matrix }) %}
3132
{%- endif %}
3233

3334
# build dict
34-
{%- set d = salt['grains.filter_by']( {'defaults': defaults}, default='defaults', merge=_config) %}
35-
3635
{%- for comp in d.components %}
3736
{%- if comp in d.pkg and d.pkg[comp] is mapping %}
3837
{%- for name,v in d.pkg[comp].items() %}

0 commit comments

Comments
 (0)