mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-14 12:51:04 +00:00
ok I see output_dest was actually used but IMHO this should be something we use the shell for, i.e. output to stdout and redirect, using tee if neccessary
This commit is contained in:
@@ -94,16 +94,6 @@ def main(args):
|
||||
error_print(msg)
|
||||
continue
|
||||
|
||||
if options.output_dest:
|
||||
fo = open(options.output_dest + '/' + hn +'.output', 'w')
|
||||
fo.write(mycmd + '\n')
|
||||
fo.write('%s:\n' % hn)
|
||||
if options.return_codes:
|
||||
fo.write('return code: %s\n' % d['rc'])
|
||||
fo.write('%s\nErrors:\n%s\n' % (d['stdout'], d['stderr']))
|
||||
fo.close()
|
||||
continue
|
||||
|
||||
if options.one_line:
|
||||
if options.return_codes:
|
||||
print '%s:%s:%s:%s' % (hn, d['rc'], d['stdout'], d['stderr'])
|
||||
@@ -123,10 +113,6 @@ def main(args):
|
||||
error_print(hn)
|
||||
print ''
|
||||
|
||||
|
||||
if options.output_dest:
|
||||
print "output written to %s" % options.output_dest
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
|
||||
Reference in New Issue
Block a user