summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/cloud/azure/azure_rm_autoscale.py
diff options
context:
space:
mode:
authorYuwei Zhou <yuwzho@microsoft.com>2018-10-18 10:52:30 +0800
committerZim Kalinowski <zikalino@microsoft.com>2018-10-18 10:52:30 +0800
commit9258ffa478ecf528a50d416004bd64f7407f6dfc (patch)
tree8344d377e92add9ca15ecc3f322c9137200b010f /lib/ansible/modules/cloud/azure/azure_rm_autoscale.py
parent1be69cd69c9e754920d28ece32c82ffab4d3ced9 (diff)
downloadansible-9258ffa478ecf528a50d416004bd64f7407f6dfc.tar.gz
Fix auto scale create with fix date without recurrence (#47186)
* Fix auto scale create with fix date without recurrence * fix indent
Diffstat (limited to 'lib/ansible/modules/cloud/azure/azure_rm_autoscale.py')
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_autoscale.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_autoscale.py b/lib/ansible/modules/cloud/azure/azure_rm_autoscale.py
index 8c3b38c2fe..e285768cfb 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_autoscale.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_autoscale.py
@@ -550,8 +550,9 @@ class AzureRMAutoScale(AzureRMModuleBase):
schedule=(RecurrentSchedule(time_zone=p.get('recurrence_timezone'),
days=p.get('recurrence_days'),
hours=p.get('recurrence_hours'),
- minutes=p.get('recurrence_mins')))
- if p.get('recurrence_frequency') else None)) for p in self.profiles or []]
+ minutes=p.get('recurrence_mins'))))
+ if p.get('recurrence_frequency') and p['recurrence_frequency'] != 'None' else None)
+ for p in self.profiles or []]
notifications = [AutoscaleNotification(email=EmailNotification(**n),
webhooks=[WebhookNotification(service_uri=w) for w in n.get('webhooks') or []])