diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index bc3fa85665..ed80001a05 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -184,7 +184,10 @@ neutron_ipam_driver: "internal" # The default ports used by each service. # The list should be in alphabetical order +aodh_internal_fqdn: "{{ kolla_internal_fqdn }}" +aodh_external_fqdn: "{{ kolla_external_fqdn }}" aodh_api_port: "8042" +aodh_api_listen_port: "{{ aodh_api_port }}" barbican_internal_fqdn: "{{ kolla_internal_fqdn }}" barbican_external_fqdn: "{{ kolla_external_fqdn }}" diff --git a/ansible/roles/aodh/defaults/main.yml b/ansible/roles/aodh/defaults/main.yml index c23bfe3d07..70b7f45d36 100644 --- a/ansible/roles/aodh/defaults/main.yml +++ b/ansible/roles/aodh/defaults/main.yml @@ -20,11 +20,13 @@ aodh_services: mode: "http" external: false port: "{{ aodh_api_port }}" + listen_port: "{{ aodh_api_listen_port }}" aodh_api_external: enabled: "{{ enable_aodh }}" mode: "http" external: true port: "{{ aodh_api_port }}" + listen_port: "{{ aodh_api_listen_port }}" aodh-evaluator: container_name: aodh_evaluator group: aodh-evaluator @@ -116,9 +118,9 @@ aodh_notifier_dimensions: "{{ default_container_dimensions }}" #################### # OpenStack #################### -aodh_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ aodh_api_port }}" -aodh_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ aodh_api_port }}" -aodh_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ aodh_api_port }}" +aodh_admin_endpoint: "{{ admin_protocol }}://{{ aodh_internal_fqdn }}:{{ aodh_api_port }}" +aodh_internal_endpoint: "{{ internal_protocol }}://{{ aodh_internal_fqdn }}:{{ aodh_api_port }}" +aodh_public_endpoint: "{{ public_protocol }}://{{ aodh_external_fqdn }}:{{ aodh_api_port }}" aodh_logging_debug: "{{ openstack_logging_debug }}" diff --git a/ansible/roles/aodh/tasks/precheck.yml b/ansible/roles/aodh/tasks/precheck.yml index 07f5b4e532..39cf225880 100644 --- a/ansible/roles/aodh/tasks/precheck.yml +++ b/ansible/roles/aodh/tasks/precheck.yml @@ -8,7 +8,7 @@ - name: Checking free port for Aodh API wait_for: host: "{{ api_interface_address }}" - port: "{{ aodh_api_port }}" + port: "{{ aodh_api_listen_port }}" connect_timeout: 1 timeout: 1 state: stopped diff --git a/ansible/roles/aodh/templates/aodh.conf.j2 b/ansible/roles/aodh/templates/aodh.conf.j2 index a5ae91e69f..8fc3c3c16d 100644 --- a/ansible/roles/aodh/templates/aodh.conf.j2 +++ b/ansible/roles/aodh/templates/aodh.conf.j2 @@ -7,7 +7,7 @@ evaluation_interval = {{ aodh_evaluation_interval }} transport_url = {{ rpc_transport_url }} [api] -port = {{ aodh_api_port }} +port = {{ aodh_api_listen_port }} host = {{ api_interface_address }} [database] diff --git a/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 b/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 index 2fe3e9be85..8e30d152ab 100644 --- a/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 +++ b/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 @@ -1,6 +1,6 @@ {% set python_path = '/usr/lib/python2.7/site-packages' if aodh_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %} {% set binary_path = '/usr/bin' if aodh_install_type == 'binary' else '/var/lib/kolla/venv/bin' %} -Listen {{ api_interface_address }}:{{ aodh_api_port }} +Listen {{ api_interface_address }}:{{ aodh_api_listen_port }} ServerSignature Off ServerTokens Prod @@ -14,7 +14,7 @@ TraceEnable off - + ## Logging ErrorLog "/var/log/kolla/aodh/aodh_wsgi_error.log" ServerSignature Off