-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebapp.yml
51 lines (46 loc) · 1.38 KB
/
webapp.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Description
# ===========
# This playbook create an Azure Linux Web app with Java container Tomcat 8.5.
#
- hosts: localhost
connection: local
vars:
resource_group_name: ansiblefest-yungez-webapp
plan_resource_group: ansiblewebapp-plan
app_name: webapp09201
location: eastus
linux_plan_name: linux_appplan1
# roles:
# - Azure.azure_preview_modules
tasks:
- name: Create resource group
azure_rm_resourcegroup:
name: "{{ resource_group_name }}"
location: "{{ location }}"
- name: Create resource group for app service plan
azure_rm_resourcegroup:
name: "{{ plan_resource_group }}"
location: "{{ location }}"
- name: Create a linux web app Java framework and Tomcat
azure_rm_webapp:
resource_group: "{{ resource_group_name }}"
name: "{{ app_name }}"
plan:
resource_group: "{{ plan_resource_group }}"
name: "{{ linux_plan_name }}"
is_linux: true
sku: S1
number_of_workers: 1
app_settings:
testkey: "testvalue"
frameworks:
- name: java
version: "8"
settings:
java_container: "Tomcat"
java_container_version: "8.5"
- name: Get web app facts
azure_rm_webapp_facts:
resource_group: "{{ resource_group_name }}"
name: "{{ app_name }}"
register: webapp