-
Notifications
You must be signed in to change notification settings - Fork 3
/
ocp_hw_settings.yml
41 lines (35 loc) · 942 Bytes
/
ocp_hw_settings.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
- name: Set memory on OCP VMs
hosts:
- beast.home.pladd.net
vars:
masters:
- ocp-m1
- ocp-m2
- ocp-m3
nodes:
- ocp-n1
- ocp-n2
tasks:
- name: get node statuses
virt:
command: status
name: "{{ item }}"
register: virt_status
with_items:
- "{{ masters }}"
- "{{ nodes }}"
- debug:
var: virt_status
- name: masters memory - 16GB / 8 CPU
command: "virsh 'setmaxmem {{ item }} --config 16G; setmem {{ item }} --config 16G; setvcpus {{ item }} --config 8'"
with_items: "{{ masters }}"
- name: node memory - 8GB / 8 CPU
command: "virsh 'setmaxmem {{ item }} --config 8G; setmem {{ item }} --config 8G; setvcpus {{ item }} --config 8'"
with_items: "{{ nodes }}"
# - name: disk size - 80GB
# command: "virsh 'vol-resize --pool virtual_machines {{ item }}.qcow2 80G'"
# with_items:
# - "{{ masters }}"
# - "{{ nodes }}"
...