mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix backward compat change - create custom required_together statement (#19642)
This commit is contained in:
parent
dceace6bb2
commit
927218d99d
1 changed files with 5 additions and 4 deletions
9
lib/ansible/modules/cloud/amazon/ec2_eip.py
Normal file → Executable file
9
lib/ansible/modules/cloud/amazon/ec2_eip.py
Normal file → Executable file
|
@ -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…
Reference in a new issue