Fix applying of attributes for returner rawfile_json

Arguments are not getting applied to the rawfile_json returner. For example if you specify an alternate filename for the output the default "/var/log/salt/events" is always used. Passing the `ret` to `_get_options(ret) resolve this.
This commit is contained in:
rbthomp 2018-10-16 15:04:56 -06:00 committed by Ch3LL
parent 174f558ba6
commit 66e97e70f3
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73

View file

@ -55,7 +55,7 @@ def returner(ret):
'''
Write the return data to a file on the minion.
'''
opts = _get_options({}) # Pass in empty ret, since this is a list of events
opts = _get_options(ret)
try:
with salt.utils.files.flopen(opts['filename'], 'a') as logfile:
salt.utils.json.dump(ret, logfile)