mirror of
https://github.com/saltstack-formulas/nfs-formula.git
synced 2025-04-17 10:10:31 +00:00
feat(service): allow disabling of nfs services
This commit is contained in:
parent
ad8d4b89dc
commit
2bfffc06a9
2 changed files with 7 additions and 2 deletions
|
@ -1,11 +1,15 @@
|
||||||
{% from "nfs/map.jinja" import nfs with context %}
|
{% from "nfs/map.jinja" import nfs with context %}
|
||||||
|
|
||||||
nfs-service:
|
nfs-service:
|
||||||
|
{% if nfs.enabled %}
|
||||||
service.running:
|
service.running:
|
||||||
|
- enable: True
|
||||||
|
{% else %}
|
||||||
|
service.dead:
|
||||||
|
- enable: False
|
||||||
|
{% endif %}
|
||||||
{% if nfs.service_name is string %}
|
{% if nfs.service_name is string %}
|
||||||
- name: {{ nfs.service_name }}
|
- name: {{ nfs.service_name }}
|
||||||
{% elif nfs.service_name is iterable %}
|
{% elif nfs.service_name is iterable %}
|
||||||
- names: {{ nfs.service_name }}
|
- names: {{ nfs.service_name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- enable: True
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ nfs:
|
||||||
mount_opts: noauto,ro
|
mount_opts: noauto,ro
|
||||||
persist_unmount: true
|
persist_unmount: true
|
||||||
persist_mount: false
|
persist_mount: false
|
||||||
|
enabled: true
|
||||||
|
|
||||||
# Server settings
|
# Server settings
|
||||||
server:
|
server:
|
||||||
|
|
Loading…
Add table
Reference in a new issue