Add diff mode output to debconf module (#2530)

Support diff such that the previous and current settings are visible
without debug output and just with `--diff` if requested.
reviewable/pr18780/r1
Tobias Wolf 8 years ago committed by René Moser
parent c848957792
commit 39972fa697

@ -161,8 +161,14 @@ def main():
prev = {question: prev[question]}
else:
prev[question] = ''
if module._diff:
after = prev.copy()
after.update(curr)
diffdict = {'before': prev, 'after': after}
else:
diff_dict = {}
module.exit_json(changed=changed, msg=msg, current=curr, previous=prev)
module.exit_json(changed=changed, msg=msg, current=curr, previous=prev, diff=diff_dict)
module.exit_json(changed=changed, msg=msg, current=prev)

Loading…
Cancel
Save