diff --git a/lib/ansible/parsing/vault/__init__.py b/lib/ansible/parsing/vault/__init__.py index 8ea80d1b07a..8635da52bff 100644 --- a/lib/ansible/parsing/vault/__init__.py +++ b/lib/ansible/parsing/vault/__init__.py @@ -275,8 +275,12 @@ class VaultEditor: try: r = call(['shred', tmp_path]) - except OSError: + except (OSError, ValueError): # shred is not available on this system, or some other error occured. + # ValueError caught because OS X El Capitan is raising an + # exception big enough to hit a limit in python2-2.7.11 and below. + # Symptom is ValueError: insecure pickle when shred is not + # installed there. r = 1 if r != 0: