You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
891 B

  1. ---
  2. - name: Query Azure VMs IPs
  3. command: az vm list-ip-addresses -o json --resource-group {{ azure_resource_group }}
  4. register: vm_ip_list_cmd
  5. - name: Query Azure VMs Roles
  6. command: az vm list -o json --resource-group {{ azure_resource_group }}
  7. register: vm_list_cmd
  8. - name: Query Azure Load Balancer Public IP
  9. command: az network public-ip show -o json -g {{ azure_resource_group }} -n kubernetes-api-pubip
  10. register: lb_pubip_cmd
  11. - name: Set VM IP, roles lists and load balancer public IP
  12. set_fact:
  13. vm_ip_list: "{{ vm_ip_list_cmd.stdout }}"
  14. vm_roles_list: "{{ vm_list_cmd.stdout }}"
  15. lb_pubip: "{{ lb_pubip_cmd.stdout }}"
  16. - name: Generate inventory
  17. template:
  18. src: inventory.j2
  19. dest: "{{ playbook_dir }}/inventory"
  20. - name: Generate Load Balancer variables
  21. template:
  22. src: loadbalancer_vars.j2
  23. dest: "{{ playbook_dir }}/loadbalancer_vars.yml"