Fixed hosts file. Added secondary dns. Gave docker group permissions to compose. Added variables to hosts file.

This commit is contained in:
2018-03-20 07:20:48 -04:00
parent 745e4652d8
commit 047e8a7a35
5 changed files with 43 additions and 20 deletions

View File

@@ -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