2016-12-12 17:21:56 +01:00
|
|
|
---
|
|
|
|
|
2020-07-27 15:24:17 +02:00
|
|
|
- name: Query Azure VMs # noqa 301
|
2016-12-12 17:21:56 +01:00
|
|
|
command: azure vm list-ip-address --json {{ azure_resource_group }}
|
|
|
|
register: vm_list_cmd
|
|
|
|
|
2019-05-16 09:27:43 +02:00
|
|
|
- name: Set vm_list
|
|
|
|
set_fact:
|
2016-12-12 17:21:56 +01:00
|
|
|
vm_list: "{{ vm_list_cmd.stdout }}"
|
|
|
|
|
|
|
|
- name: Generate inventory
|
2019-05-02 23:24:21 +02:00
|
|
|
template:
|
|
|
|
src: inventory.j2
|
|
|
|
dest: "{{ playbook_dir }}/inventory"
|
2021-07-12 10:00:47 +03:00
|
|
|
mode: 0644
|