[tutorial Rougail 4.1] conditional disabled variable

NFS configuration
=================

Need could be activated. In this case, we need to add server domain name

---
env_nfs:
  configure: true
  server: another-nfs.silique.fr

Examples of Ops inventory file
==============================

1/ INVALID, only with Rougail:

---
env_nfs:
  configure: false
  server: another-nfs.silique.fr

2/ VALID:

---
env_nfs:
  configure: true
This commit is contained in:
egarette@silique.fr 2023-12-18 11:34:35 +01:00
parent a7a2d7150a
commit 6505eb6255

View file

@ -9,3 +9,14 @@ env_nfs:
a NFS server
type: boolean
default: false
server:
description: NFS server name
help: Configure NFS server only if env_nfs.configure is true
type: domainname
default: nfs.silique.fr
disabled:
type: jinja
jinja: |
{% if not socle.env_nfs.configure %}
NFS is disabled
{% endif %}