Do not add state: absent when a non-existent path is returned (#51350)

Leave it up to the module to return the state in the results.

I went through all the modules in files/ and only found one case where the module needed to return this. No other modules return paths that do not exists.

Signed-off-by: Sam Doran <sdoran@redhat.com>
This commit is contained in:
Sam Doran 2019-02-22 19:48:44 -05:00 committed by Dag Wieers
commit cc9c72d6f8
3 changed files with 4 additions and 4 deletions

View file

@ -470,9 +470,9 @@ def ensure_absent(path):
'path': path})
diff = initial_diff(path, 'absent', prev_state)
result.update({'path': path, 'changed': True, 'diff': diff})
result.update({'path': path, 'changed': True, 'diff': diff, 'state': 'absent'})
else:
result.update({'path': path, 'changed': False})
result.update({'path': path, 'changed': False, 'state': 'absent'})
return result