Move ansible to it's own directory structure
This commit is contained in:
32
ansible/playbooks/proxmox_start_vm.yml
Normal file
32
ansible/playbooks/proxmox_start_vm.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
- name: Create VM ID from IP address for Proxmox hosts
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Start Proxmox VM
|
||||
delegate_to: "localhost"
|
||||
when: platform is defined and platform == "proxmox"
|
||||
community.proxmox.proxmox_kvm:
|
||||
api_user: "{{ proxmox_user }}"
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: "{{ proxmox_host }}"
|
||||
name: "{{ inventory_hostname }}"
|
||||
node: "{{ proxmox_clone_node }}"
|
||||
state: started
|
||||
|
||||
# - name: Wait for the VM to start
|
||||
# delegate_to: "localhost"
|
||||
# wait_for:
|
||||
# port: 22
|
||||
# host: "{{ inventory_hostname }}"
|
||||
# search_regex: OpenSSH
|
||||
# delay: 10
|
||||
# timeout: 60
|
||||
|
||||
# - name: Wait for the reboot to complete if there was a change.
|
||||
# wait_for_connection:
|
||||
# connect_timeout: 10
|
||||
# sleep: 5
|
||||
# delay: 5
|
||||
# timeout: 300
|
||||
Reference in New Issue
Block a user