From 6859888e61db1b99901bf5d7e6df839158f5e1e7 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 18 Dec 2023 11:34:36 +0100 Subject: [PATCH] [tutorial Ansible 4.2] conditional disabled + hidden NFS configuration ================= Need could be activated. In this case, we need to add server domain name Examples of Ops inventory file ============================== 1/ VALID: --- env_nfs: configure: false 2/ INVALID, configure is false but default: env_nfs: server: another-nfs.silique.fr 3/ VALID: --- env_nfs: configure: true 4/ VALID env_nfs: configure: true server: another-nfs.silique.fr --- Ansible/inventory/group_vars/all/nfs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ansible/inventory/group_vars/all/nfs.yml b/Ansible/inventory/group_vars/all/nfs.yml index 4c4b5d7..f2a13e4 100644 --- a/Ansible/inventory/group_vars/all/nfs.yml +++ b/Ansible/inventory/group_vars/all/nfs.yml @@ -1,4 +1,5 @@ --- env_nfs_all: configure: "{{ env_nfs.configure | default(false) }}" - server: "{{ env_nfs.server | default('nfs.silique.fr') }}" + server: "{{ env_nfs.server | default('') }}" + device: "{{ env_nfs.server | default('') }}:/nfs"