2016-12-13 00:21:56 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Query Azure VMs
|
|
|
|
command: azure vm list-ip-address --json {{ azure_resource_group }}
|
|
|
|
register: vm_list_cmd
|
|
|
|
|
2019-05-16 15:27:43 +08:00
|
|
|
- name: Set vm_list
|
|
|
|
set_fact:
|
2016-12-13 00:21:56 +08:00
|
|
|
vm_list: "{{ vm_list_cmd.stdout }}"
|
|
|
|
|
|
|
|
- name: Generate inventory
|
2019-05-03 05:24:21 +08:00
|
|
|
template:
|
|
|
|
src: inventory.j2
|
|
|
|
dest: "{{ playbook_dir }}/inventory"
|