Hi,

I am trying to build a role which will help us to create new security 
groups on AWS based on a dictionary. But I have an issue with one to enable 
the rules parsing caused by a conflict between 2 args that are mutually 
exclusive. 

Imagine the following lines:

rules:
       cidr_ip: "{{ item.1.cidr_ip | default(omit) }}"
       group_id: "{{ item.1.group_id | default(omit) }}"

I can only have one or another, but not both defined. I though that 'omit' 
filter would do the job, removing the arg from the rules dictionary, but it 
is not working. The AWS module trigger this failure:

// ec2_group.py
    if 'group_id' in rule and 'cidr_ip' in rule:
         module.fail_json(msg='Specify group_id OR cidr_ip, not both')



Is there anyway that I can solve this issue? Or is this a bug?

Ansible version: 2.2.2.0


// Anderson

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0a759f5c-8ede-4712-95c7-d1b17c1e90cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to