diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index 6be3e9ef7..36cf4daa1 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -134,6 +134,7 @@ - { name: neutron_ml2, file: neutron/ml2_conf.ini } - { name: nova, file: nova.conf } - { name: octavia, file: octavia.conf } + - { name: placement, file: placement.conf } - { name: sahara, file: sahara.conf } - { name: zookeeper, file: zookeeper.cfg } @@ -244,6 +245,7 @@ kolla_extra_neutron_ml2: "{{ kolla_extra_config.neutron_ml2 | default }}" kolla_extra_nova: "{{ kolla_extra_config.nova | default }}" kolla_extra_octavia: "{{ kolla_extra_config.octavia | default }}" + kolla_extra_placement: "{{ kolla_extra_config.placement | default }}" kolla_extra_sahara: "{{ kolla_extra_config.sahara | default }}" kolla_extra_zookeeper: "{{ kolla_extra_config.zookeeper | default }}" kolla_extra_config_path: "{{ kayobe_env_config_path }}/kolla/config" diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index 975eb78af..ae32392a7 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -456,6 +456,15 @@ kolla_extra_nova: # Whether to enable Octavia. kolla_enable_octavia: +############################################################################### +# Placement configuration. + +# Whether to enable placement. +kolla_enable_placement: + +# Free form extra configuration to append to placement.conf. +kolla_extra_placement: + ############################################################################### # Prometheus configuration. diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml index 0309f8c2a..14b0bbc86 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml @@ -123,6 +123,10 @@ provisioner: kolla_extra_octavia: | [extra-octavia.conf] foo=bar + kolla_enable_placement: true + kolla_extra_placement: | + [extra-placement.conf] + foo=bar kolla_enable_prometheus: true kolla_enable_sahara: true kolla_extra_sahara: | diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py b/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py index 55c30179c..6d5f67fe5 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py @@ -51,6 +51,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( 'neutron', 'nova', 'octavia', + 'placement', 'prometheus', 'sahara', 'storm', @@ -84,6 +85,7 @@ def test_service_config_directory(host, path): 'neutron.conf', 'nova.conf', 'octavia.conf', + 'placement.conf', 'sahara.conf', 'backup.my.cnf', 'zookeeper.cfg']) diff --git a/ansible/roles/kolla-openstack/tasks/config.yml b/ansible/roles/kolla-openstack/tasks/config.yml index 37c146760..b13a47099 100644 --- a/ansible/roles/kolla-openstack/tasks/config.yml +++ b/ansible/roles/kolla-openstack/tasks/config.yml @@ -39,6 +39,7 @@ - { src: neutron.conf.j2, dest: neutron.conf, enabled: "{{ kolla_enable_neutron }}" } - { src: nova.conf.j2, dest: nova.conf, enabled: "{{ kolla_enable_nova }}" } - { src: octavia.conf.j2, dest: octavia.conf, enabled: "{{ kolla_enable_octavia }}" } + - { src: placement.conf.j2, dest: placement.conf, enabled: "{{ kolla_enable_placement }}" } - { src: sahara.conf.j2, dest: sahara.conf, enabled: "{{ kolla_enable_sahara }}" } - { src: zookeeper.cfg.j2, dest: zookeeper.cfg, enabled: "{{ kolla_enable_zookeeper }}" } when: item.enabled | bool diff --git a/ansible/roles/kolla-openstack/templates/placement.conf.j2 b/ansible/roles/kolla-openstack/templates/placement.conf.j2 new file mode 100644 index 000000000..287a13d03 --- /dev/null +++ b/ansible/roles/kolla-openstack/templates/placement.conf.j2 @@ -0,0 +1,9 @@ +# {{ ansible_managed }} + +{% if kolla_extra_placement %} +####################### +# Extra configuration +####################### + +{{ kolla_extra_placement }} +{% endif %} diff --git a/ansible/roles/kolla-openstack/vars/main.yml b/ansible/roles/kolla-openstack/vars/main.yml index 207d3d9ad..5a53c844f 100644 --- a/ansible/roles/kolla-openstack/vars/main.yml +++ b/ansible/roles/kolla-openstack/vars/main.yml @@ -180,6 +180,11 @@ kolla_openstack_custom_config: dest: "{{ kolla_node_custom_config_path }}/octavia" patterns: "*" enabled: "{{ kolla_enable_octavia }}" + # Placement + - src: "{{ kolla_extra_config_path }}/placement" + dest: "{{ kolla_node_custom_config_path }}/placement" + patterns: "*" + enabled: "{{ kolla_enable_placement }}" # Prometheus config - src: "{{ kolla_extra_config_path }}/prometheus" dest: "{{ kolla_node_custom_config_path }}/prometheus" diff --git a/doc/source/configuration/reference/kolla-ansible.rst b/doc/source/configuration/reference/kolla-ansible.rst index 4e6db4289..f4ab06eed 100644 --- a/doc/source/configuration/reference/kolla-ansible.rst +++ b/doc/source/configuration/reference/kolla-ansible.rst @@ -720,6 +720,8 @@ which files are supported. ``nova/*`` Extended nova configuration. ``octavia.conf`` Octavia configuration. ``octavia/*`` Extended Octavia configuration. + ``placement.conf`` Placement configuration. + ``placement/*`` Extended Placement configuration. ``prometheus/*`` Prometheus configuration. ``sahara.conf`` Sahara configuration. ``sahara/*`` Extended sahara configuration. diff --git a/releasenotes/notes/add-extended-placement-conf-70a4b9a318c1b555.yaml b/releasenotes/notes/add-extended-placement-conf-70a4b9a318c1b555.yaml new file mode 100644 index 000000000..96e016b1f --- /dev/null +++ b/releasenotes/notes/add-extended-placement-conf-70a4b9a318c1b555.yaml @@ -0,0 +1,3 @@ +--- +features: + - Adds support for custom Placement configuration.