From e4bfc2b84c6ff81a5b964771766fa97542b64820 Mon Sep 17 00:00:00 2001 From: Robin Roth Date: Wed, 11 Jan 2017 19:30:18 +0100 Subject: [PATCH] Add ZYPP_LOCK_TIMEOUT environment example (#20130) Retries to require lock for zypper operation. --- lib/ansible/modules/packaging/os/zypper.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/packaging/os/zypper.py b/lib/ansible/modules/packaging/os/zypper.py index a3fe2aa2b1..e219de5082 100644 --- a/lib/ansible/modules/packaging/os/zypper.py +++ b/lib/ansible/modules/packaging/os/zypper.py @@ -168,7 +168,14 @@ EXAMPLES = ''' # Install specific version (possible comparisons: <, >, <=, >=, =) - zypper: name: 'docker>=1.10' - state: installed + state: present + +# Wait 20 seconds to acquire the lock before failing +- zypper: + name: mosh + state: present + environment: + ZYPP_LOCK_TIMEOUT: 20 '''