From e7b08498860f5844fe9eaa297316f1ba9e3b9156 Mon Sep 17 00:00:00 2001 From: Simon Dodsley Date: Thu, 17 Aug 2017 13:35:52 -0400 Subject: [PATCH] Fix incorrect bool check in Pure Storage modules (#28007) --- lib/ansible/modules/storage/purestorage/purefa_pg.py | 2 +- lib/ansible/modules/storage/purestorage/purefa_volume.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/storage/purestorage/purefa_pg.py b/lib/ansible/modules/storage/purestorage/purefa_pg.py index 42fd73e8824..a6f1e82a074 100644 --- a/lib/ansible/modules/storage/purestorage/purefa_pg.py +++ b/lib/ansible/modules/storage/purestorage/purefa_pg.py @@ -162,7 +162,7 @@ def delete_pgroup(module, array): changed = True if not module.check_mode: array.destroy_pgroup(module.params['pgroup']) - if module.params['eradicate'] == 'true': + if module.params['eradicate']: array.eradicate_pgroup(module.params['pgroup']) module.exit_json(changed=changed) diff --git a/lib/ansible/modules/storage/purestorage/purefa_volume.py b/lib/ansible/modules/storage/purestorage/purefa_volume.py index b015a8359e8..69679cb98f9 100644 --- a/lib/ansible/modules/storage/purestorage/purefa_volume.py +++ b/lib/ansible/modules/storage/purestorage/purefa_volume.py @@ -141,7 +141,7 @@ def delete_volume(module, array): """ Delete Volume""" if not module.check_mode: array.destroy_volume(module.params['name']) - if module.params['eradicate'] == 'true': + if module.params['eradicate']: array.eradicate_volume(module.params['name']) module.exit_json(changed=True)