Making variables optional
By default, Ansible requires values for all variables in a templated expression. However, you can make specific module variables optional. For example, you might want to use a system default for some items and control the value for others. To make a module variable optional, set the default value to the special variableomit:
In this example, the default mode for the files/tmp/fooand/tmp/baris determined by the umask of the system. Ansible does not send a value formode. Only the third file,/tmp/baz, receives themode=0444option.