Allow extra free-form configuration for nova

This commit is contained in:
Mark Goddard 2017-05-19 14:19:39 +01:00
parent 17165c4da7
commit b73e96493b
4 changed files with 38 additions and 0 deletions

View File

@ -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 }}"

View File

@ -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:

View File

@ -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 }}"

View File

@ -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 %}