Merge "FQDN validation"
[apex-tripleo-heat-templates.git] / puppet / services / swift-ringbuilder.yaml
index 8ed4e9f..2e3c818 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: 2016-10-14
+heat_template_version: ocata
 
 description: >
   OpenStack Swift Ringbuilder
@@ -38,7 +38,20 @@ parameters:
     default: {}
     description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
     type: json
+  SwiftUseLocalDir:
+    default: true
+    description: 'Use a local directory for Swift storage services when building rings'
+    type: boolean
 
+conditions:
+  swift_use_local_dir:
+    and:
+    - equals:
+      - get_param: SwiftUseLocalDir
+      - true
+    - equals:
+      - get_param: SwiftRawDisks
+      - {}
 
 outputs:
   role_data:
@@ -56,7 +69,7 @@ outputs:
             expression: $.data.raw_disk_lists.flatten()
             data:
               raw_disk_lists:
-              - [':%PORT%/d1']
+              - {if: [swift_use_local_dir, [':%PORT%/d1'], []]}
               - repeat:
                   template: ':%PORT%/DEVICE'
                   for_each: