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>
Adding ec2-related module example to examples/playbooks
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
Fix #2125 and clean up a few things along the way
Don't consider packages missing from the cache an error on remove

Fixes #2017.
teach apt module to support --check mode
teach lineinfile module to support --check mode
fixes freebsd setup issues with jails
Signed-off-by: Brian Coca <bcoca@tablethotels.com>