heat: switch auth_uri to use uri_no_suffix
[apex-tripleo-heat-templates.git] / puppet / services / ec2-api.yaml
index 090e0c4..10f6d31 100644 (file)
@@ -72,13 +72,13 @@ outputs:
           ec2api::api::ec2api_listen:
             str_replace:
               template:
-                '"%{::fqdn_$NETWORK}"'
+                "%{hiera('fqdn_$NETWORK')}"
               params:
                 $NETWORK: {get_param: [ServiceNetMap, Ec2ApiNetwork]}
           ec2api::metadata::metadata_listen:
             str_replace:
               template:
-                '"%{::fqdn_$NETWORK}"'
+                "%{hiera('fqdn_$NETWORK')}"
               params:
                 $NETWORK: {get_param: [ServiceNetMap, Ec2ApiMetadataNetwork]}
           ec2api::db::database_connection:
@@ -118,7 +118,7 @@ outputs:
       upgrade_tasks:
         - name: Check if ec2-api is deployed
           command: systemctl is-enabled openstack-ec2-api
-          tags: step0,validation
+          tags: common
           ignore_errors: True
           register: ec2_api_enabled
         - name: "PreUpgrade step0,validation: Check if openstack-ec2-api is running"
@@ -129,5 +129,10 @@ outputs:
           tags: step0,validation
         - name: Stop openstack-ec2-api service
           tags: step1
+          when: ec2_api_enabled.rc == 0
           service: name=openstack-ec2-api state=stopped
+        - name: Install openstack-ec2-api package if it was disabled
+          tags: step3
+          yum: name=openstack-ec2-api state=latest
+          when: ec2_api_enabled.rc != 0