|
| 1 | +OpenStack Flavors |
| 2 | +================= |
| 3 | + |
| 4 | +This role can be used to register flavors in Nova using the |
| 5 | +`openstack.cloud.compute_flavor` module. |
| 6 | + |
| 7 | +Requirements |
| 8 | +------------ |
| 9 | + |
| 10 | +The OpenStack Nova API should be accessible from the target host. |
| 11 | + |
| 12 | +Role Variables |
| 13 | +-------------- |
| 14 | + |
| 15 | +`os_flavors_venv` is a path to a directory in which to create a |
| 16 | +virtualenv. |
| 17 | + |
| 18 | +`os_flavors_auth_type` is an authentication type compatible with |
| 19 | +the `auth_type` argument of `openstack.cloud` Ansible modules. |
| 20 | + |
| 21 | +`os_flavors_auth` is a dict containing authentication information |
| 22 | +compatible with the `auth` argument of `openstack.cloud` Ansible modules. |
| 23 | + |
| 24 | +`os_flavors_cacert` is an optional path to a CA certificate bundle. |
| 25 | + |
| 26 | +`os_flavors_interface` is the endpoint URL type to fetch from the service |
| 27 | +catalog. Maybe be one of `public`, `admin`, or `internal`. |
| 28 | + |
| 29 | +`os_flavors` is a list of Nova flavors to register. Each item should be a dict |
| 30 | +containing the items 'name', 'ram', 'disk', and 'vcpus'. Optionally, the dict |
| 31 | +may contain 'ephemeral', 'flavorid', 'rxtx_factor' and 'swap' items. |
| 32 | +Optionally, the dict may also contain an item 'extra_specs', which is a dict of |
| 33 | +metadata to attach to the flavor object. |
| 34 | + |
| 35 | +Dependencies |
| 36 | +------------ |
| 37 | + |
| 38 | +This role depends on the `stackhpc.openstack.os_openstacksdk` role. |
| 39 | + |
| 40 | +Example Playbook |
| 41 | +---------------- |
| 42 | + |
| 43 | +The following playbook registers a Nova flavor. |
| 44 | + |
| 45 | + --- |
| 46 | + - name: Ensure Nova flavors are registered |
| 47 | + hosts: localhost |
| 48 | + roles: |
| 49 | + - role: stackhpc.openstack.os_flavors |
| 50 | + os_flavors_venv: "~/os-flavors-venv" |
| 51 | + os_flavors_auth_type: "password" |
| 52 | + os_flavors_auth: |
| 53 | + project_name: <keystone project> |
| 54 | + username: <keystone user> |
| 55 | + password: <keystone password> |
| 56 | + auth_url: <keystone auth URL> |
| 57 | + os_flavors: |
| 58 | + - name: flavor-1 |
| 59 | + ram: 1024 |
| 60 | + disk: 1024 |
| 61 | + vcpus: 2 |
| 62 | + extra_specs: |
| 63 | + hw:cpu_policy: "dedicated" |
| 64 | + hw:numa_nodes: "1" |
| 65 | + |
| 66 | +Author Information |
| 67 | +------------------ |
| 68 | + |
| 69 | +- Mark Goddard ( <[email protected]>) |
0 commit comments