-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_disposable_public_ubuntu_vm.yml
84 lines (82 loc) · 2.54 KB
/
deploy_disposable_public_ubuntu_vm.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
- name: Deploy Disposable Ubuntu VM
hosts: localhost
vars_prompt:
- name: vm_name
prompt: Name of the virtual machine
private: false
- name: admin_username
prompt: The admin username for the Virtual Machine
private: false
- name: ssh_password
prompt: Password for the SSH private key
private: true
- name: enable_acc_net
prompt: Enable accelerated networking?
private: false
- name: location
prompt: The location for the resources
private: false
- name: network_security_group_id
prompt: ID of the Network Security Group
private: false
- name: os_disk_type
prompt: OS Disk storage type
private: false
- name: os_disk_size
prompt: OS Disk capacity
private: false
- name: public_ip_address_type
prompt: Public IP address type
private: false
- name: public_ip_address_sku
prompt: Public IP address type SKU
private: false
- name: storage_account_name
prompt: Name of the storage account for diagnostics
private: false
- name: subnet_name
prompt: Name of the subnet
private: false
- name: vm_resource_group_name
prompt: Resource group for the VM resources
private: false
- name: vm_size
prompt: Size of the virtual machine
private: false
- name: vnet_id
prompt: ID of the virtual network
private: false
- name: key_vault_name
prompt: Name of the Key Vault
private: false
- name: key_vault_rg_name
prompt: Resource Group containing the Key Vault
private: false
vars:
computer_name: "{{ vm_name }}"
computer_fqdn_name: "{{ computer_name }}.{{ dns_domain }}"
deployment_name: "{{ vm_name }}-{{ subnet_name }}-{{ location }}"
dns_domain: "{{ location }}.cloudapp.azure.com"
image_reference:
publisher: canonical
offer: 0001-com-ubuntu-server-focal
sku: 20_04-lts-gen2
version: latest
network_interface_name: "{{ vm_name }}-nic0"
nic_delete_option: Delete
output_dir: tmp
os_disk_delete_option: Delete
patch_mode: AutomaticByOS
pip_delete_option: Delete
public_ip_address_name: "{{ vm_name }}-pip0"
resource_tags:
environment: example
phase: example
source: ansible-azure
secret_file: "{{ admin_username }}-{{ computer_name }}.pub"
secret_name: "{{ admin_username }}-{{ computer_name }}-ssh-public-key"
roles:
- role: local_ssh_key_gen
- role: azure_key_vault_secret_file
- role: linux_disposable_public_vm