community.general/lib/ansible
Marius Gedminas 0a7f2c202b Improve --diff output when files lack trailing newlines
The behavior now matches GNU diff.

Fixes #14094.

Example of output before this change:

    TASK [healthchecks.io : hourly healthchecks.io ping] ***************************
    changed: [ranka]
    --- before: /etc/cron.hourly/mg-healthchecks-dot-io
    +++ after: /tmp/tmpOTvXTw
    @@ -1,2 +1,2 @@
     #!/bin/sh
    -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null+curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null

after this change:

    TASK [healthchecks.io : hourly healthchecks.io ping] ***************************
    changed: [ranka]
    --- before: /etc/cron.hourly/mg-healthchecks-dot-io
    +++ after: /tmp/tmpOTvXTw
    @@ -1,2 +1,2 @@
     #!/bin/sh
    -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null
    \ No newline at end of file
    +curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null

The added unit tests contain more examples.

This commit also takes care to avoid "no newline at EOF" warnings when
no_log is in effect, and also when modules return dicts rather than
strings.  (It also removes trailing whitespace from using json
serialization when diffing dicts, because I hate trailing whitespace in
Python source files, even if they're test files.)
2017-01-09 11:49:03 -05:00
..
cli Correctly set loader path when using list tags/tasks 2016-12-21 21:01:02 -06:00
compat Fix role completion detection problem 2017-01-03 14:32:44 -06:00
config
errors adds feature to all modules to be run locally (#18763) 2016-12-15 15:47:29 -05:00
executor Allow OSError to skip scriptdir removal 2017-01-05 15:50:56 -08:00
galaxy For container enabled role, display warning only when not ANSIBLE_CONTAINER (#18717) 2016-12-02 10:08:10 -05:00
inventory warn when examined group_vars is not dir 2016-12-22 12:39:31 -05:00
module_utils Add a fact about apparmor, to see if that's loaded or not 2017-01-09 10:12:13 -05:00
modules refactors ios_config to use network_cli plugin (#20042) 2017-01-09 11:19:25 -05:00
parsing Add a encode() to AnsibleVaultEncryptedUnicode (#19840) 2017-01-04 12:17:19 -05:00
playbook Fixing security bugs for CVE-2016-9587 2017-01-09 10:43:03 -06:00
plugins Improve --diff output when files lack trailing newlines 2017-01-09 11:49:03 -05:00
template Fixing security bugs for CVE-2016-9587 2017-01-09 10:43:03 -06:00
utils Contributing new module to manage HUAWEI data center CloudEngine switch. (#19793) 2017-01-03 22:30:59 -05:00
vars Fixing security bugs for CVE-2016-9587 2017-01-09 10:43:03 -06:00
__init__.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
constants.py Fix constants to use environment variables in preference to config files 2017-01-05 17:11:51 -08:00
release.py Bumping devel version to 2.3.0 2016-10-03 11:46:31 -05:00
test-requirements.txt