A config file ends up containing `__omit_place_holder__3f1c9e...`
AdvancedTroubleshootingVariables, Facts and Precedence Problems
Answer
Likely causes → omit was used inside a larger string or a nested structure:
extra_args: "--timeout={{ timeout | default(omit) }}"
omit only works when it is the entire value of a module parameter. Anywhere else, its placeholder string leaks into the output.
Fix → Build the value conditionally:
extra_args: "{{ ('--timeout=' ~ timeout) if timeout is defined else '' }}"
For dictionaries, filter out the unwanted keys (dict2items | rejectattr(...) | items2dict) instead of putting omit inside them.
Prevent → Use default(omit) only at the top level of module arguments. Search rendered outputs in CI for __omit_place_holder__.
More on Variables, Facts and Precedence Problems
Variables in `group_vars/webservers.yml` are silently ignoredBeginnerYou set `nginx_port: 8443` in inventory `group_vars`, but the role still uses `80`Intermediate`set_fact: release_tag=v2` runs, but later tasks still see `v1`Intermediate`'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'` when templating `hostvars['db01']`Intermediate`'ansible_eth0' is undefined` on new cloud instancesBeginnerFacts like `ansible_hostname` became undefined after someone changed `ansible.cfg`Intermediate