[2.8] Fix traceback when using gluster_volume

Since bricks_in_volume is a list, it can't be compared to a int.

(cherry picked from commit 06651d1055)
This commit is contained in:
Michael Scherer 2019-07-01 16:36:59 +02:00 committed by Toshio Kuratomi
parent 35ba55599a
commit e97ceafa82
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- Fixes comparison of list to integer in gluster_volume (https://github.com/ansible/ansible/issues/56844).

View file

@ -548,7 +548,7 @@ def main():
if brick not in bricks_in_volume:
new_bricks.append(brick)
if not new_bricks and len(all_bricks) < bricks_in_volume:
if not new_bricks and len(all_bricks) < len(bricks_in_volume):
for brick in bricks_in_volume:
if brick not in all_bricks:
removed_bricks.append(brick)