diff options
author | 2016-12-21 10:06:44 +0000 | |
---|---|---|
committer | 2017-01-06 08:32:18 +0100 | |
commit | f6511ece5f6c510110205621fc292a2a03d87d4e (patch) | |
tree | ea46892f4d8add3a5a3a8ab0d426d11a4dc3f906 /puppet/services/swift-ringbuilder.yaml | |
parent | 384c400d472702392ff506c26d652bcf585f1ec6 (diff) |
Auto-set SwiftMountCheck and SwiftUseLocalDir settings
This patch automatically sets the options SwiftMountCheck and
SwiftUseLocalDir depending on SwiftRawDisks.
If SwiftRawDisks is set, the usage of a local directory will be
automatically disabled in the ringbuilder and the mount check option
will be enabled.
Change-Id: If58cecc94c25603f50411ffe60ad24c104147c66
Diffstat (limited to 'puppet/services/swift-ringbuilder.yaml')
-rw-r--r-- | puppet/services/swift-ringbuilder.yaml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/puppet/services/swift-ringbuilder.yaml b/puppet/services/swift-ringbuilder.yaml index a7ba7bad..2e3c818f 100644 --- a/puppet/services/swift-ringbuilder.yaml +++ b/puppet/services/swift-ringbuilder.yaml @@ -43,6 +43,16 @@ parameters: 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: description: Role data for Swift Ringbuilder configuration. @@ -59,7 +69,7 @@ outputs: expression: $.data.raw_disk_lists.flatten() data: raw_disk_lists: - - {if: [{get_param: SwiftUseLocalDir}, [':%PORT%/d1'], []]} + - {if: [swift_use_local_dir, [':%PORT%/d1'], []]} - repeat: template: ':%PORT%/DEVICE' for_each: |