# Should omit not work, for philosophical reasons, when used with prefix/postfix string data?

**URL:** <https://forum.ansible.com/t/should-omit-not-work-for-philosophical-reasons-when-used-with-prefix-postfix-string-data/17563>\
**Category:** Ansible Developer\
**Created:** [February 19, 2015, 5:05am UTC](https://forum.ansible.com/t/should-omit-not-work-for-philosophical-reasons-when-used-with-prefix-postfix-string-data/17563 "2015-02-19T05:05:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Case](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@Jacob\_Case](https://forum.ansible.com/u/Jacob_Case)\
**Post date:** [February 19, 2015, 5:05am UTC](https://forum.ansible.com/t/should-omit-not-work-for-philosophical-reasons-when-used-with-prefix-postfix-string-data/17563/1 "2015-02-19T05:05:32Z")

</div>

Hello,

In the tests for test\_good\_parsing for integration tests, [there is a test](https://github.com/ansible/ansible/blob/f8a30faeee70947827df5914ecc78db578499ee6/test/integration/roles/test_good_parsing/tasks/main.yml#L176) that fails if any extra string data is provided with an omit, like “prefix{{ omit }}”.  
Is there a reason that this is a preferred behavior? I’m asking because I forked and made a change that will still omit a parameter if it has any prefix/postfix string data, but I wouldn’t want to submit a pull request for something that has already been decided against. If there is nothing against it, I can change the test so that condition allows the prefix and still omits the parameter and submit a pull request.

My particular use case was creating a docker container with a volume mounted in the container at a predefined place, but only if the host volume was defined, otherwise using ephemeral storage, like “{{ host\_volume|default(omit) }}:/data/db”.

Thanks,

-Jacob Case
