blob: 427c4124f2599bc68f46a7ab9aafc53f4f92f773 [file] [log] [blame]
Saikrishna68619402017-07-18 21:02:40 -04001---
2# Setup nova flavors with perf attributes
3
4- name: Upgrade pbr
5 pip:
6 name: pbr
7 extra_args: --upgrade
8 become: True
9
10- name: Install shade
11 pip:
12 name: shade
13 become: True
14
15- name: Delete existing flavors except m1.tiny
16 os_nova_flavor:
17 state: absent
18 cacert: "{{ requests_ca_bundle }}"
19 auth:
20 auth_url: "https://keystone.{{ site_suffix }}:5000/v2.0"
21 username: admin
22 password: "{{ keystone_admin_password }}"
23 project_name: admin
24 name: "{{ item }}"
25 with_items:
26 - m1.small
27 - m1.medium
28 - m1.large
29 - m1.xlarge
30
31- name: Re-create flavors with perf attributes
32 os_nova_flavor:
33 state: present
34 cacert: "{{ requests_ca_bundle }}"
35 auth:
36 auth_url: "https://keystone.{{ site_suffix }}:5000/v2.0"
37 username: admin
38 password: "{{ keystone_admin_password }}"
39 project_name: admin
40 name: "{{ item.name }}"
41 ram: "{{ item.ram }}"
42 vcpus: "{{ item.vcpus }}"
43 disk: "{{ item.disk }}"
44 extra_specs:
45 "hw:mem_page_size": 2048
46 "hw:cpu_policy": dedicated
47 with_items:
48 - { name: 'm1.small', ram: 2048, vcpus: 1, disk: 20 }
49 - { name: 'm1.medium', ram: 4096, vcpus: 2, disk: 40 }
50 - { name: 'm1.large', ram: 8192, vcpus: 4, disk: 80 }
51 - { name: 'm1.xlarge', ram: 16384, vcpus: 8, disk: 160 }