Only allocate a PTY when sudo is used

Postpone the paramiko.Channel.get_pty until we know sudo is used. If
sudo is not used, then we do not need a PTY. In fact, the paramiko docs
explicitly state that it's not desirable to allocate a PTY for a simple
exec_command.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Initialise PTY from calling environment

If we need to acquire a PTY for sudo's use, then it should really
inherit the capabilities of the calling environment. This is what
OpenSSH does, and so it makes sense to copy this behaviour for the
paramiko connection type.

Closes: #2065
Signed-off-by: martin f. krafft <madduck@madduck.net>
Correct ec2_vol doc errors
check_mode is a module property
Merge pull request #2116 from lwade/devel

Correct ec2_vol doc errors
Adding ec2-related module example to examples/playbooks
Fixed remove_key
Merge pull request #2123 from lessmian/devel

Fixed remove_key
Add support for additional EXAMPLES string in Ansible modules
return DOC and EXAMPLES as a list
add moduledev explanation
more
uri doc fixes
Merge pull request #2127 from romeotheriault/uri-doc-fixes

uri module doc fixes
postgresql_user: Add support for PUBLIC

This change enables users to add and remove permissions to all roles,
using the PUBLIC user. This is equivalent to using the PUBLIC keyword
in GRANT and DENY postgres SQL commands.

For example, see: <http://www.postgresql.org/docs/current/interactive/sql-grant.html>

Fixes #1833
Add documentation about PUBLIC user
Rewrite best practices section.
Merge pull request #2128 from lorin/postgres-public

postgresql_user: Add support for PUBLIC
mail module: properly set charset
sysctl module: fixed issue when checks_after fail on comparing keys with values separated by white strings
sysctl module: fixed issue when checks_after fail on comparing keys with values separated by white strings
Merge pull request #2131 from lessmian/sysctl_module

sysctl module: fixed issue when checks_after fail on comparing keys with...
Merge pull request #2130 from lessmian/devel

mail module: properly set charset