Fixed hosts file. Added secondary dns. Gave docker group permissions to compose. Added variables to hosts file.
This commit is contained in:
@@ -12,18 +12,30 @@
|
||||
api_user: "{{ proxmox_user }}"
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: "{{ proxmox_host }}"
|
||||
clone : "{{ ubuntu_template_vm_name }}"
|
||||
name : '{{ inventory_hostname }}'
|
||||
node : 'rack2'
|
||||
storage : 'SSD1'
|
||||
format : 'qcow2'
|
||||
timeout : 3000
|
||||
clone: "{{ ubuntu_template_vm_name }}"
|
||||
name: '{{ inventory_hostname }}'
|
||||
node: '{{ hypervisor }}'
|
||||
storage: 'SSD1'
|
||||
format: 'qcow2'
|
||||
timeout: 3000
|
||||
register: cloned
|
||||
|
||||
- name: Wait 10 seconds for proxmox to register the new node
|
||||
wait_for: timeout=10
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Set resources
|
||||
delegate_to: localhost
|
||||
proxmox_kvm:
|
||||
api_user: "{{ proxmox_user }}"
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: "{{ proxmox_host }}"
|
||||
name: '{{ inventory_hostname }}'
|
||||
node: '{{ hypervisor }}'
|
||||
cores: '{{ cpus }}'
|
||||
memory: '{{ memory }}'
|
||||
when: cloned.changed
|
||||
|
||||
- name: Start VM
|
||||
delegate_to: localhost
|
||||
proxmox_kvm:
|
||||
@@ -31,7 +43,7 @@
|
||||
api_password: "{{ proxmox_password }}"
|
||||
api_host: "{{ proxmox_host }}"
|
||||
name: '{{ inventory_hostname }}'
|
||||
node: rack2
|
||||
node: '{{ hypervisor }}'
|
||||
state: started
|
||||
when: cloned.changed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user