Change the way we do with_items to make them happen next to each other in runner, which eliminates the problem of with_items and vars_files sometimes not playing nice with each other.

(Also a fix for the user module error handling when the user
is not present at the time of the return.  This can only really be caused by multiple ansible executions).
reviewable/pr18780/r1
Michael DeHaan 12 years ago
parent 31d9111857
commit 3d4efc0504

@ -54,6 +54,13 @@ def add_user_info(kwargs):
if user_exists(name): if user_exists(name):
kwargs['state'] = 'present' kwargs['state'] = 'present'
info = user_info(name) info = user_info(name)
if info == False:
if 'failed' in kwargs:
kwargs['notice'] = "failed to look up user name: %s" % name
else:
kwargs['msg'] = "failed to look up user name: %s" % name
kwargs['failed'] = True
return kwargs
kwargs['uid'] = info[2] kwargs['uid'] = info[2]
kwargs['group'] = info[3] kwargs['group'] = info[3]
kwargs['comment'] = info[4] kwargs['comment'] = info[4]

Loading…
Cancel
Save