Hello,
I’m trying to create a helper role to raise ec2 instances, and I stumbled in a problem where I wanted to deleted or ignore some module options, based on the role vars.
First, let’s say I have a playbook like this.
Hello,
I’m trying to create a helper role to raise ec2 instances, and I stumbled in a problem where I wanted to deleted or ignore some module options, based on the role vars.
First, let’s say I have a playbook like this.
try:
exact_count: "{{my_count|default(omit)}}"
Thanks!
Sorry for the stupid question, I should’ve looked up a little better
I’ve managed to obtain the behaviour I wanted like this:
my_aws_role/tasks/main.yml
my_aws_role/defaults/main.yml
exact_count: “{{ omit }}”
my_tags: “{{mandatory}}”
create-instance.yml
Thank you again!