Merge "mysql: Only set certificate specs if TLS everywhere is enabled" into stable...
[apex-tripleo-heat-templates.git] / docker / services / heat-api-cfn.yaml
index aff0f1a..84bc067 100644 (file)
@@ -69,6 +69,8 @@ outputs:
         map_merge:
           - get_attr: [HeatBase, role_data, config_settings]
           - apache::default_vhost: false
+      logging_source: {get_attr: [HeatBase, role_data, logging_source]}
+      logging_groups: {get_attr: [HeatBase, role_data, logging_groups]}
       step_config: &step_config
         get_attr: [HeatBase, role_data, step_config]
       service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
@@ -107,6 +109,7 @@ outputs:
                   - /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro
                   - /var/lib/config-data/puppet-generated/heat_api_cfn/:/var/lib/kolla/config_files/src:ro
                   - /var/log/containers/heat:/var/log/heat
+                  - /var/log/containers/httpd/heat-api-cfn:/var/log/httpd
                   -
                     if:
                       - internal_tls_enabled
@@ -122,11 +125,31 @@ outputs:
       host_prep_tasks:
         - name: create persistent logs directory
           file:
-            path: /var/log/containers/heat
+            path: "{{ item }}"
             state: directory
+          with_items:
+            - /var/log/containers/heat
+            - /var/log/containers/httpd/heat-api-cfn
       upgrade_tasks:
-        - name: Stop and disable heat_api_cfn service
+        - name: Check if heat_api_cfn is deployed
+          command: systemctl is-enabled openstack-heat-api-cfn
+          tags: common
+          ignore_errors: True
+          register: heat_api_cfn_enabled
+        - name: check for heat_api_cfn running under apache (post upgrade)
           tags: step2
-          service: name=httpd state=stopped enabled=no
+          shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_cfn_wsgi"
+          register: heat_api_cfn_apache
+          ignore_errors: true
+          changed_when: false
+          check_mode: no
+        - name: Stop heat_api_cfn service (running under httpd)
+          tags: step2
+          service: name=httpd state=stopped
+          when: heat_api_cfn_apache.rc == 0
+        - name: Stop and disable heat_api_cfn service (pre-upgrade not under httpd)
+          tags: step2
+          service: name=openstack-heat-api-cfn state=stopped enabled=no
+          when: heat_api_cfn_enabled.rc == 0
       metadata_settings:
         get_attr: [HeatBase, role_data, metadata_settings]