Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (40 sloc) 1.04 KB
---
# Create or update a template deployment based on uris using parameter and template links
- name: Create Azure Deploy
azure_rm_deployment:
state: present
location: koreasouth
resource_group_name: AnsibleVMGroup
parameters:
storageAccountName:
value: "avmstoragedig"
adminUsername:
value: "ansibleuser"
adminPassword:
value: "Ansible!2345678"
dnsNameforLBIP:
value: "ansibleweb123"
vmNamePrefix:
value: "WebVM"
lbName:
value: "WebLB"
nicNamePrefix:
value: "webservernic"
publicIPAddressName:
value: "WebPublicIP"
vnetName:
value: "AnsibleVNet"
vmSize:
value: "Standard_D2s_v3"
template: "{{ lookup('file','../armtemplate/azuredeploy.json') | from_json }}"
tags:
- create
delegate_to: 127.0.0.1
# Destroy a template deployment
- name: Destroy Azure Deploy
azure_rm_deployment:
state: absent
resource_group_name: AnsibleVMGroup
tags:
- destroy
delegate_to: 127.0.0.1