From b0cc3072dc589cd06341689c48d53bbe10c22385 Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Thu, 11 Apr 2019 17:28:27 +0800 Subject: [PATCH] Fix in function app (#55134) --- .../modules/cloud/azure/azure_rm_functionapp.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_functionapp.py b/lib/ansible/modules/cloud/azure/azure_rm_functionapp.py index 2a02af8f64..f8974a1ddc 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_functionapp.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_functionapp.py @@ -344,11 +344,16 @@ class AzureRMFunctionApp(AzureRMModuleBase): """Construct the necessary app settings required for an Azure Function App""" function_app_settings = [] - for key in ['AzureWebJobsStorage', 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING', 'AzureWebJobsDashboard']: - function_app_settings.append(NameValuePair(name=key, value=self.storage_connection_string)) - function_app_settings.append(NameValuePair(name='FUNCTIONS_EXTENSION_VERSION', value='~1')) - function_app_settings.append(NameValuePair(name='WEBSITE_NODE_DEFAULT_VERSION', value='6.5.0')) - function_app_settings.append(NameValuePair(name='WEBSITE_CONTENTSHARE', value=self.name)) + + if self.container_settings is None: + for key in ['AzureWebJobsStorage', 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING', 'AzureWebJobsDashboard']: + function_app_settings.append(NameValuePair(name=key, value=self.storage_connection_string)) + function_app_settings.append(NameValuePair(name='FUNCTIONS_EXTENSION_VERSION', value='~1')) + function_app_settings.append(NameValuePair(name='WEBSITE_NODE_DEFAULT_VERSION', value='6.5.0')) + function_app_settings.append(NameValuePair(name='WEBSITE_CONTENTSHARE', value=self.name)) + else: + function_app_settings.append(NameValuePair(name='FUNCTIONS_EXTENSION_VERSION', value='~2')) + return function_app_settings def aggregated_app_settings(self):