From 6e64a78f943fe2b11661213d7f5c74b310d422a2 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 11 May 2017 19:03:10 +0100 Subject: [PATCH] Support extra user configuration for magnum.conf --- ansible/kolla-openstack.yml | 2 ++ ansible/roles/kolla-openstack/defaults/main.yml | 9 +++++++++ ansible/roles/kolla-openstack/tasks/config.yml | 1 + ansible/roles/kolla-openstack/templates/magnum.conf.j2 | 9 +++++++++ 4 files changed, 21 insertions(+) create mode 100644 ansible/roles/kolla-openstack/templates/magnum.conf.j2 diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index 2f5683fee..ebb0986b8 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -17,6 +17,7 @@ - { name: glance, file: glance.conf } - { name: inspector, file: ironic-inspector.conf } - { name: ironic, file: ironic.conf } + - { name: magnum, file: magnum.conf } - { name: neutron, file: neutron.conf } - { name: neutron_ml2, file: neutron/ml2_conf.ini } @@ -81,5 +82,6 @@ kolla_extra_glance: "{{ kolla_extra_config.glance | default }}" kolla_extra_inspector: "{{ kolla_extra_config.inspector | default }}" kolla_extra_ironic: "{{ kolla_extra_config.ironic | default }}" + 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 }}" diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index fd6ea7d66..dcee74ce9 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -159,6 +159,15 @@ kolla_inspector_dhcp_pool_start: # End of range of IP addresses for dnsmasq to allocate from. kolla_inspector_dhcp_pool_end: +############################################################################### +# Magnum configuration. + +# Whether to enable Magnum. +kolla_enable_magnum: + +# Free form extra configuration to append to magnum.conf. +kolla_magnum_extra: + ############################################################################### # Neutron configuration. diff --git a/ansible/roles/kolla-openstack/tasks/config.yml b/ansible/roles/kolla-openstack/tasks/config.yml index 679ffd0b3..cfb8234fa 100644 --- a/ansible/roles/kolla-openstack/tasks/config.yml +++ b/ansible/roles/kolla-openstack/tasks/config.yml @@ -20,6 +20,7 @@ - { src: ironic.conf.j2, dest: ironic.conf, enabled: "{{ kolla_enable_ironic }}" } - { src: ironic-dnsmasq.conf.j2, dest: ironic/ironic-dnsmasq.conf, enabled: "{{ kolla_enable_ironic }}" } - { src: ironic-inspector.conf.j2, dest: ironic-inspector.conf, enabled: "{{ kolla_enable_ironic }}" } + - { 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: pxelinux.default.j2, dest: ironic/pxelinux.default, enabled: "{{ kolla_enable_ironic }}" } diff --git a/ansible/roles/kolla-openstack/templates/magnum.conf.j2 b/ansible/roles/kolla-openstack/templates/magnum.conf.j2 new file mode 100644 index 000000000..03e40fc9e --- /dev/null +++ b/ansible/roles/kolla-openstack/templates/magnum.conf.j2 @@ -0,0 +1,9 @@ +# {{ ansible_managed }} + +{% if kolla_extra_magnum %} +####################### +# Extra configuration +####################### + +{{ kolla_extra_magnum }} +{% endif %}