You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/files
Tobias Wolf 99ba594f0a Add diff for both file contents and file attributes to lineinfile
Using the difflist feature added in ansible/ansible@c337293 we can add
two diffs to the `diff` dict returned as JSON: A `before` and `after` pair of
changed file contents and the diff of the file attributes.

n.b.: the difflist handling from the above commit is logically broken.
PR will follow.

Example output:

    TASK [change line and mode] ************************************************************
    changed: [localhost]
    --- before: /tmp/sshd_config (content)
    +++ after: /tmp/sshd_config (content)
    @@ -65,21 +65,21 @@
     X11DisplayOffset 10
     PrintMotd no
     PrintLastLog yes
     TCPKeepAlive yes
     #UseLogin no

     #MaxStartups 10:30:60
     #Banner /etc/issue.net

     # Allow client to pass locale environment variables
    -AcceptEnv LANG LC_*
    +AcceptEnv        LANG LC_* GF_ENV_*

     Subsystem sftp /usr/lib/openssh/sftp-server

     # Set this to 'yes' to enable PAM authentication, account processing,
     # and session processing. If this is enabled, PAM authentication will
     # be allowed through the ChallengeResponseAuthentication and
     # PasswordAuthentication.  Depending on your PAM configuration,
     # PAM authentication via ChallengeResponseAuthentication may bypass
     # the setting of "PermitRootLogin without-password".
     # If you just want the PAM account and session checks to run without

    --- before: /tmp/sshd_config (file attributes)
    +++ after: /tmp/sshd_config (file attributes)
    @@ -1,3 +1,3 @@
     {
    -    "mode": "0700"
    +    "mode": "0644"
     }
10 years ago
..
__init__.py package files 11 years ago
acl.py Fix: Default ACL parameters are not correctly handled 10 years ago
assemble.py minor doc fixes 10 years ago
copy.py Fix doc inconsistency (#2630) 10 years ago
fetch.py Add note about precautions of using become with fetch. Addresses https://github.com/ansible/ansible/issues/14064 10 years ago
file.py adds diff info for file info 10 years ago
find.py since find doesn't make changes, support check mode and gather data for other tasks in check mode 10 years ago
ini_file.py Fix #2475 ini_file module: bracklets in key break idempotence 10 years ago
lineinfile.py Add diff for both file contents and file attributes to lineinfile 10 years ago
replace.py minor doc fixes 11 years ago
stat.py added mime option to stat module 10 years ago
synchronize.py Merge pull request #2891 from ansible/synchronize-better-error-missing-rsync 10 years ago
template.py Merge pull request #1670 from mikeputnam/issue-1643-gpl-header 11 years ago
unarchive.py improved error message when no handler found 10 years ago
xattr.py Proper author info for all remaining modules 11 years ago