I would like to set an ansible variable to some default value but only if the variable is undefined. Otherwise I would like to keep it unchanged.
I tried these two approaches and both of them produce recursive loop:
namespace: "{{namespace|default(default_namespace)}}"
namespace: "{% if namespace is defined %}{{namespace}}{% else %}{{default_namespace}}{% endif %}"