Is your feature request related to a problem?
It is not possible to enable the Nginx service without starting it as shown here:
{% set service_function = {True:'running', False:'dead'}.get(nginx.service.enable) %}
I would like to be able to enable the service without starting it (useful when creating VM images) or start the service without enabling it.
Describe the solution you'd like
I would suggest dissociating the Salt state function to use (e.g. running, dead) from the value of the enable pillar option:
nginx:
service:
enable: true
start: true
By introducing the new pillar option start, it becomes possible to enable the service without starting it and vice versa:
{% set service_function = {True:'running', False:'dead'}.get(nginx.service.start) %}
...
nginx_service:
service.{{ service_function }}:
{{ sls_block(nginx.service.opts) }}
- name: {{ nginx.lookup.service }}
- enable: {{ nginx.service.enable }}
...
This is made possible because both running and dead functions have the same enable parameter to enable or not the service.
Describe alternatives you've considered
Nothing comes to my mind.
Additional context
Nothing to add.
Is your feature request related to a problem?
It is not possible to enable the Nginx service without starting it as shown here:
I would like to be able to enable the service without starting it (useful when creating VM images) or start the service without enabling it.
Describe the solution you'd like
I would suggest dissociating the Salt state function to use (e.g.
running,dead) from the value of theenablepillar option:By introducing the new pillar option
start, it becomes possible to enable the service without starting it and vice versa:This is made possible because both
runninganddeadfunctions have the sameenableparameter to enable or not the service.Describe alternatives you've considered
Nothing comes to my mind.
Additional context
Nothing to add.