26 lines
631 B
YAML
26 lines
631 B
YAML
---
|
|
- name: Stop prod cluster
|
|
hosts: nomad_instances
|
|
vars:
|
|
template_vm_name: jammy-cloud-tmpl
|
|
|
|
tasks:
|
|
- name: Stop prod cluster
|
|
community.general.proxmox_kvm:
|
|
name: "{{ test_prod_vm }}"
|
|
state: stopped
|
|
delegate_to: localhost
|
|
when: test_prod_vm
|
|
|
|
- name: Create test instances
|
|
community.general.proxmox_kvm:
|
|
clone: "{{ template_vm_name }}"
|
|
name: "{{ ansible_hostname }}"
|
|
ipconfig:
|
|
ipconfig0: "ip={{ test_ip_address }},gw=192.168.2.1"
|
|
delegate_to: localhost
|
|
|
|
- name: Wait for cluster to spin up
|
|
|
|
- import_playbook: setup-cluster.yml
|