From 48dc38f322689ab065d529a0d80ee6337e4afb4c Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Thu, 21 Jan 2021 10:44:56 -0700 Subject: [PATCH] Fix swift bare variable warning [DEPRECATION WARNING]: evaluating 'swift_raw_disks' as a bare variable, this behaviour will go away and you might need to add |bool to the expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. Change-Id: I1d99dccc3ad8c6550581e69d48c7e7b365d53c7a --- deployment/swift/swift-storage-container-puppet.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/swift/swift-storage-container-puppet.yaml b/deployment/swift/swift-storage-container-puppet.yaml index 6a3f9b7d18..8539ae5512 100644 --- a/deployment/swift/swift-storage-container-puppet.yaml +++ b/deployment/swift/swift-storage-container-puppet.yaml @@ -621,14 +621,14 @@ outputs: dev: "{{ swift_raw_disks[item]['base_dir']|default('/dev') }}/{{ item }}" opts: -f -i size=1024 with_items: "{{ swift_raw_disks }}" - when: swift_raw_disks + when: swift_raw_disks|length > 0 - name: Refresh facts if SwiftRawDisks is set to get uuids if newly created partitions setup: gather_subset: - '!all' - '!min' - 'hardware' - when: swift_raw_disks + when: swift_raw_disks|length > 0 - name: Mount devices defined in SwiftRawDisks mount: name: /srv/node/{{ item }} @@ -637,7 +637,7 @@ outputs: opts: noatime state: mounted with_items: "{{ swift_raw_disks }}" - when: swift_raw_disks + when: swift_raw_disks|length > 0 deploy_steps_tasks: - name: Configure rsyslog for swift-storage when: