How to Use Omit in Array Variable

Posted on

I am trying to use default(omit) .If I used in simple variable like below it is working but same is not working with array variable.

Working:
irule_names: "{{ irules | default(omit) }}"

Not Working:
irule_names:
- "{{ irules | default(omit) }}"

It's giving error if irule is not passed""irule_names": "\"__omit_place_holder__a6d01df2bb32233a9e2d5bc73e66f953864dbdbb\"\n",

I can not use first option as target we need to pass it via array variable

Responses