Fix backward compat change - create custom required_together statement (#19642)

pull/18946/head
Rob 8 years ago committed by John R Barker
parent dceace6bb2
commit 927218d99d

@ -365,10 +365,7 @@ def main():
module = AnsibleModule(
argument_spec=argument_spec,
supports_check_mode=True,
required_together=[
('device_id', 'private_ip_address'),
]
supports_check_mode=True
)
if not HAS_BOTO:
@ -386,6 +383,10 @@ def main():
reuse_existing_ip_allowed = module.params.get('reuse_existing_ip_allowed')
release_on_disassociation = module.params.get('release_on_disassociation')
# Parameter checks
if private_ip_address is not None and device_id is None:
module.fail_json(msg="parameters are required together: ('device_id', 'private_ip_address')")
if instance_id:
warnings = ["instance_id is no longer used, please use device_id going forward"]
is_instance = True

Loading…
Cancel
Save