Skip to content

Commit

Permalink
fix(services): split enable/running mongos
Browse files Browse the repository at this point in the history
Test shows:
  Service mongos has been enabled, and is dead

Attempt to split running and enable states
  • Loading branch information
Adrien "ze" Urban committed Jul 7, 2022
1 parent 96b02bc commit ce9c356
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mongodb/service/running.sls
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,23 @@ include:
{%- else %}
service.running:
- name: {{ servicename }}
- enable: True
- onlyif: systemctl list-unit-files | grep {{ servicename }} >/dev/null 2>&1
- require:
- sls: {{ sls_software_install }}
- sls: {{ sls_config_users }}
{%- if 'config' in software and software['config'] is mapping %}
- watch:
- file: {{ formula }}-config-file-{{ servicename }}-file-managed
{%- endif %}
{{ formula }}-service-running-{{ comp }}-{{ servicename }}-enabled:
service.enabled:
- name: {{ servicename }}
- onlyif: systemctl list-unit-files | grep {{ servicename }} >/dev/null 2>&1
{%- endif %}
- require:
- sls: {{ sls_software_install }}
- sls: {{ sls_config_users }}
{%- if 'config' in software and software['config'] is mapping %}
- watch:
- file: {{ formula }}-config-file-{{ servicename }}-file-managed
{%- endif %}
Expand Down

0 comments on commit ce9c356

Please sign in to comment.