diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index a340d3dbe..b54c18394 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -20,6 +20,7 @@ - { name: magnum, file: magnum.conf } - { name: neutron, file: neutron.conf } - { name: neutron_ml2, file: neutron/ml2_conf.ini } + - { name: nova, file: nova.conf } - name: Initialise a fact containing extra configuration set_fact: @@ -92,3 +93,4 @@ kolla_extra_magnum: "{{ kolla_extra_config.magnum | default }}" kolla_extra_neutron: "{{ kolla_extra_config.neutron | default }}" kolla_extra_neutron_ml2: "{{ kolla_extra_config.neutron_ml2 | default }}" + kolla_extra_nova: "{{ kolla_extra_config.nova | default }}" diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index c298850a6..c981608dd 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -219,3 +219,12 @@ kolla_extra_neutron: # Free form extra configuration to append to ml2_conf.ini. kolla_extra_neutron_ml2: + +############################################################################### +# Nova configuration. + +# Whether to enable Nova. +kolla_enable_nova: + +# Free form extra configuration to append to nova.conf. +kolla_extra_nova: diff --git a/ansible/roles/kolla-openstack/tasks/config.yml b/ansible/roles/kolla-openstack/tasks/config.yml index cfb8234fa..9ab7506ff 100644 --- a/ansible/roles/kolla-openstack/tasks/config.yml +++ b/ansible/roles/kolla-openstack/tasks/config.yml @@ -23,6 +23,7 @@ - { src: magnum.conf.j2, dest: magnum.conf, enabled: "{{ kolla_enable_magnum }}" } - { src: ml2_conf.ini.j2, dest: neutron/ml2_conf.ini, enabled: "{{ kolla_enable_neutron }}" } - { src: neutron.conf.j2, dest: neutron.conf, enabled: "{{ kolla_enable_neutron }}" } + - { src: nova.conf.j2, dest: nova.conf, enabled: "{{ kolla_enable_nova }}" } - { src: pxelinux.default.j2, dest: ironic/pxelinux.default, enabled: "{{ kolla_enable_ironic }}" } when: "{{ item.enabled | bool }}" diff --git a/ansible/roles/kolla-openstack/templates/nova.conf.j2 b/ansible/roles/kolla-openstack/templates/nova.conf.j2 new file mode 100644 index 000000000..53043e119 --- /dev/null +++ b/ansible/roles/kolla-openstack/templates/nova.conf.j2 @@ -0,0 +1,26 @@ +# {{ ansible_managed }} + +[DEFAULT] +{% if kolla_enable_ironic | bool %} +# Taken from the ironic configuration guide. + +# Flag to decide whether to use baremetal_scheduler_default_filters or not. +# (boolean value) +scheduler_use_baremetal_filters=True + +# Determines if the Scheduler tracks changes to instances to help with +# its filtering decisions (boolean value) +scheduler_tracks_instance_changes=False + +# For ironic, this should be set to a number >= the number of ironic nodes +# to more evenly distribute instances across the nodes. +scheduler_host_subset_size=9999999 +{% endif %} + +{% if kolla_extra_nova %} +####################### +# Extra configuration +####################### + +{{ kolla_extra_nova }} +{% endif %}