diff --git a/lib/ansible/modules/cloud/amazon/ec2_eip.py b/lib/ansible/modules/cloud/amazon/ec2_eip.py index f8474d483c..b1ad5eb0b3 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_eip.py +++ b/lib/ansible/modules/cloud/amazon/ec2_eip.py @@ -388,9 +388,9 @@ def main(): module = AnsibleModule( argument_spec=argument_spec, supports_check_mode=True, - required_together=[ - ['device_id', 'private_ip_address'], - ], + required_by={ + 'private_ip_address': ['device_id'], + }, ) if not HAS_BOTO: