# Ansible Skills - The default(omit) feature

**URL:** <https://forum.ansible.com/t/ansible-skills-the-default-omit-feature/46063>\
**Category:** Get Help\
**Tags:** howto\
**Created:** [July 20, 2026, 1:12pm UTC](https://forum.ansible.com/t/ansible-skills-the-default-omit-feature/46063 "2026-07-20T13:12:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![IPvSean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ipvsean/32/1153_2.png) [@IPvSean](https://forum.ansible.com/u/IPvSean)\
**Post date:** [July 20, 2026, 1:12pm UTC](https://forum.ansible.com/t/ansible-skills-the-default-omit-feature/46063/1 "2026-07-20T13:12:38Z")

</div>

I put together a quick video on one of my favorite (and, in my opinion, underrated) Ansible features: `default(omit)`.

[![](https://us1.discourse-cdn.com/ansible/original/2X/5/502c6cdc32ad61db706261213723411a4fd22187.jpeg "Ansible Skills - The default(omit) feature #ansibletutorial #ansible #ansibletraining") ](https://www.youtube.com/watch?v=GSbzvIKWywQ)

It’s a simple trick that lets you completely omit a module parameter when a variable isn’t defined, instead of passing an empty value. I use it all the time to make playbooks more reusable and avoid extra `when` statements or duplicate tasks.

The video is under 3 minutes and includes a simple localhost demo using the `copy` module to show how it works.

I’m curious, what’s your favorite “hidden gem” in Ansible that more people should know about? I’m looking for ideas for future shorts.

---

<div class="post-metadata">

**Author:** ![U880D](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/u880d/32/10032_2.png) [@U880D](https://forum.ansible.com/u/U880D)\
**Post date:** [July 21, 2026, 7:40am UTC](https://forum.ansible.com/t/ansible-skills-the-default-omit-feature/46063/2 "2026-07-21T07:40:53Z")

</div>

In my opinion, whereby videos for first users and beginners are good to gain an overview and start learning fast, it will become a disadvantage later on. One can not search in it or do copy and paste … Would it be OK for you to add some writings, the text and example playbook from the video to your post?

Apart from that and if someone is interested, the documentation has also some information about [Making variables optional](https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_filters.html#making-variables-optional).

---

<div class="post-metadata">

**Author:** ![IPvSean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ipvsean/32/1153_2.png) [@IPvSean](https://forum.ansible.com/u/IPvSean)\
**Post date:** [July 22, 2026, 3:08pm UTC](https://forum.ansible.com/t/ansible-skills-the-default-omit-feature/46063/3 "2026-07-22T15:08:58Z")

</div>

That is great feedback, I am putting my playbooks and some descriptions on Github to make this easy for folks to read or cut and paste: [ansible-tips/tips/default-omit at main · ansible-tmm/ansible-tips · GitHub](https://github.com/ansible-tmm/ansible-tips/tree/main/tips/default-omit)

Do you think this would work?

---

<div class="post-metadata">

**Author:** ![U880D](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/u880d/32/10032_2.png) [@U880D](https://forum.ansible.com/u/U880D)\
**Post date:** [July 22, 2026, 3:50pm UTC](https://forum.ansible.com/t/ansible-skills-the-default-omit-feature/46063/4 "2026-07-22T15:50:45Z")

</div>

> [@IPvSean](#):
>
> Do you think this would work?

Sure, that’s one way to go. Looks good relady.
