From bf5fbfe2a7710f71c70f108e031cfc03f9dbe32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannig=20Perr=C3=A9?= Date: Fri, 15 Jan 2016 16:33:42 +0100 Subject: [PATCH] Use -f when pvcreate to avoid interactive input. Fix https://github.com/ansible/ansible-modules-extras/issues/1504 --- lib/ansible/modules/extras/system/lvg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/extras/system/lvg.py b/lib/ansible/modules/extras/system/lvg.py index 9e3ba2d293..68c9d7575a 100644 --- a/lib/ansible/modules/extras/system/lvg.py +++ b/lib/ansible/modules/extras/system/lvg.py @@ -183,7 +183,7 @@ def main(): ### create PV pvcreate_cmd = module.get_bin_path('pvcreate', True) for current_dev in dev_list: - rc,_,err = module.run_command("%s %s" % (pvcreate_cmd,current_dev)) + rc,_,err = module.run_command("%s -f %s" % (pvcreate_cmd,current_dev)) if rc == 0: changed = True else: @@ -224,7 +224,7 @@ def main(): ### create PV pvcreate_cmd = module.get_bin_path('pvcreate', True) for current_dev in devs_to_add: - rc,_,err = module.run_command("%s %s" % (pvcreate_cmd, current_dev)) + rc,_,err = module.run_command("%s -f %s" % (pvcreate_cmd, current_dev)) if rc == 0: changed = True else: