command modules: optional stdin_add_newline (#45170)

* stdin_add_newline: allow newline suppression on command modules

* command/shell: test for stdin_add_newline

* changelog for stdin_add_newline
This commit is contained in:
James Cassell 2018-10-31 12:53:02 -04:00 committed by Brian Coca
parent 1a91b797bd
commit 8eacaf6a77
4 changed files with 66 additions and 1 deletions

View file

@ -60,6 +60,12 @@ options:
description:
- Set the stdin of the command directly to the specified value.
version_added: "2.4"
stdin_add_newline:
type: bool
default: yes
description:
- If set to C(yes), append a newline to stdin data.
version_added: "2.8"
notes:
- If you want to execute a command securely and predictably, it may be
better to use the M(command) module instead. Best practices when writing