Add checkmode support for test-module script

Signed-off-by: Hector Acosta <hector.acosta@gmail.com>
Merge pull request #8214 from hacosta/checkmode

Add checkmode support for test-module script
Revert "Explicitly set the user option for ssh connections"

This reverts commit 0f91add86f7d30e6d895e01bbfddb93a3b5e48df.

Fixes #8216
Make code more PEP8 compliant (if(x))

Remove useless parentheses, `if (x):` should be `if x:`.
Make code more PEP8 compliant (whitespace)

> Always surround these binary operators with a single space on either
> side: assignment (`=`), augmented assignment (`+=`, `-=`
> etc.), comparisons (`==`, `<`, `>`, ``!=``, `<>`, `<=`,
> `>=`, `in`, `not in`, `is`, `is not`), Booleans (`and`,
> `or`, `not`).
Make docker inventory plugin more Pythonic

There's no need to check if kwargs is empty before iterating over it.
Refactor CronTab.is_empty
Make code more PEP8 compliant (if len(seq))

> For sequences, (strings, lists, tuples), use the fact that empty
> sequences are false.
>
>     Yes: if not seq:
>          if seq:
>
>     No: if len(seq)
>         if not len(seq)