Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multi-container apps to azure_rm_webapp #257

Merged
merged 5 commits into from
Nov 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion plugins/modules/azure_rm_webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
suboptions:
name:
description:
- Name of container, for example C(imagename:tag).
- Name of the container, for example C(imagename:tag).
- To create a multi-container app, the name should be 'COMPOSE|' or 'KUBE|' followed by base64 encoded configuration.
registry_server_url:
description:
- Container registry server URL, for example C(mydockerregistry.io).
Expand Down Expand Up @@ -234,6 +235,16 @@
registry_server_user: user
registry_server_password: pass

- name: Create a multi-container web app
azure_rm_webapp:
resource_group: myResourceGroup
name: myMultiContainerWebapp
plan: myAppServicePlan
app_settings:
testkey: testvalue
container_settings:
name: "COMPOSE|{{ lookup('file', 'docker-compose.yml') | b64encode }}"
Fred-sun marked this conversation as resolved.
Show resolved Hide resolved

- name: Create a linux web app with Node 6.6 framework
azure_rm_webapp:
resource_group: myResourceGroup
Expand Down Expand Up @@ -637,6 +648,10 @@ def exec_module(self, **kwargs):

linux_fx_version += self.container_settings['name']

# Use given name as is if it starts with allowed values of multi-container application
if self.container_settings['name'].startswith('COMPOSE|') or self.container_settings['name'].startswith('KUBE|'):
linux_fx_version = self.container_settings['name']

self.site_config['linux_fx_version'] = linux_fx_version

if self.container_settings.get('registry_server_user'):
Expand Down