mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
Availability zone should not be required
This commit is contained in:
parent
3957238fbf
commit
2d7f0e28db
1 changed files with 3 additions and 3 deletions
|
@ -399,9 +399,11 @@ class ElastiCacheManager(object):
|
||||||
unmodifiable_data = {
|
unmodifiable_data = {
|
||||||
'node_type': self.data['CacheNodeType'],
|
'node_type': self.data['CacheNodeType'],
|
||||||
'engine': self.data['Engine'],
|
'engine': self.data['Engine'],
|
||||||
'zone': self.data['PreferredAvailabilityZone'],
|
|
||||||
'cache_port': self._get_port()
|
'cache_port': self._get_port()
|
||||||
}
|
}
|
||||||
|
# Only check for modifications if zone is specified
|
||||||
|
if self.zone is not None:
|
||||||
|
unmodifiable_data['zone'] = self.data['PreferredAvailabilityZone']
|
||||||
for key, value in unmodifiable_data.iteritems():
|
for key, value in unmodifiable_data.iteritems():
|
||||||
if getattr(self, key) != value:
|
if getattr(self, key) != value:
|
||||||
return True
|
return True
|
||||||
|
@ -506,8 +508,6 @@ def main():
|
||||||
|
|
||||||
if state == 'present' and not num_nodes:
|
if state == 'present' and not num_nodes:
|
||||||
module.fail_json(msg="'num_nodes' is a required parameter. Please specify num_nodes > 0")
|
module.fail_json(msg="'num_nodes' is a required parameter. Please specify num_nodes > 0")
|
||||||
if state == 'present' and not zone:
|
|
||||||
module.fail_json(msg="'zone' is a required parameter. Please specify an availability zone")
|
|
||||||
|
|
||||||
if not aws_secret_key:
|
if not aws_secret_key:
|
||||||
if 'AWS_SECRET_KEY' in os.environ:
|
if 'AWS_SECRET_KEY' in os.environ:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue