1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix for function app settings (#54662)

This commit is contained in:
Zim Kalinowski 2019-04-01 16:50:08 +08:00 committed by GitHub
parent 11e3cc3cab
commit c85e3e0794
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View file

@ -280,10 +280,18 @@ class AzureRMFunctionApp(AzureRMModuleBase):
function_app_settings = self.necessary_functionapp_settings()
for app_setting_key in self.app_settings:
function_app_settings.append(NameValuePair(
name=app_setting_key,
value=self.app_settings[app_setting_key]
))
found_setting = None
for s in function_app_settings:
if s.name == app_setting_key:
found_setting = s
break
if found_setting:
found_setting.value = self.app_settings[app_setting_key]
else:
function_app_settings.append(NameValuePair(
name=app_setting_key,
value=self.app_settings[app_setting_key]
))
return function_app_settings
@property

View file

@ -50,6 +50,7 @@
app_settings:
hello: world
things: more stuff
FUNCTIONS_EXTENSION_VERSION: "~2"
register: output
- name: assert the function with app settings was created
@ -64,6 +65,7 @@
app_settings:
hello: world
things: more stuff
FUNCTIONS_EXTENSION_VERSION: "~2"
another: one
register: output