Create nova flavor for Octavia

The nova flavor for Octavia was previously created from puppet-octavia
but it didn't offer a convenient way to select the type of the API
endpoint (it uses public API endpoint by default while some deployments
don't have access to the external network from their controllers).

Moving the creation of the flavor to a tripleo-ansible role helps us to
use the existing configuration (the roles use the internal endpoints)
and centralizes the creation of all the resources required by Octavia in
a single place.

Change-Id: I6cbb9a50f4bf952e927f6eba7fdb993cfbb9cb72
This commit is contained in:
Gregory Thiemonge 2021-12-07 15:57:58 +01:00
parent 2d31f2b82b
commit a9cdfe2980
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,15 @@
---
- name: create nova flavor for Octavia
shell: |
if ! openstack flavor show octavia_{{ octavia_flavor_id }} > /dev/null; then
openstack flavor create -vv \
--id {{ octavia_flavor_id }} \
--ram {{ octavia_flavor_properties.ram }} \
--disk {{ octavia_flavor_properties.disk }} \
--vcpus {{ octavia_flavor_properties.vcpus }} \
--private \
octavia_{{ octavia_flavor_id }}
fi
run_once: true
when: octavia_manage_nova_flavor | default(false) | bool

View File

@ -5,6 +5,8 @@
- include_tasks: quotas.yml
- include_tasks: flavor.yml
- import_tasks: check_existing_certs.yml
when:
- generate_certs | bool