Commit Graph

537 Commits (4bdd755412c2d077306d7bc12f743a2790242af0)

Author SHA1 Message Date
Brian Coca cefdb9a494 Merge pull request #2896 from towolf/add_diff_to_lineinfile
Add diff to lineinfile.py for both file contents and file attributes
9 years ago
Brian Coca 81b827f869 fixed option name mismatch, added aliases
also removed empty aliases
9 years ago
Brian Coca 8c2ef29a7a added follow to specific modules that support it
was removed from common file docs
9 years ago
Jose Moreira cb712f2ba8 Fixed module doc typos 9 years ago
Brian Coca 191bf977f7 Merge pull request #3042 from lgp171188/patch-1
Fix typo in the copy module error message
9 years ago
Brian Coca 238c26c7e2 recursive copy is not available(yet) on remote_src 9 years ago
Guruprasad ea6c2573e3 Fix typo in the copy module error message
Fix the typos in the error message shown on trying to use remote_src=yes for copying directories
9 years ago
Brian Coca b89f4c7cab cleaner error on recursive remote copy
TODO: add recursive copy support when remote_src=yes
probably need to make shared the logic in the action plugin.
9 years ago
Brian Coca 6a42e54e57 removed 'overquoting' of example
fixes #3029
9 years ago
Toshio Kuratomi 93d02189f6 Remove duplicate documentation fields 9 years ago
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"
     }
9 years ago
Toshio Kuratomi c8d5fdaf27 Merge pull request #2891 from ansible/synchronize-better-error-missing-rsync
Better error message when rsync nad ssh aren't present where synchronize is run
9 years ago
Toshio Kuratomi cb1fefdf92 Better error message when rsync nad ssh aren't present where synchronize is run
Fixes https://github.com/ansible/ansible/issues/9305
9 years ago
Brian Coca 3239691e9e Merge pull request #2870 from towolf/add_diff_to_synchronize
Add custom diff field to synchronize module
9 years ago
Tobias Wolf cd3b9366fe Add custom or 'prepared' diff field to synchronize module
This PR depends on pull requeest ansible/ansible#14105

rsync has a custom diff output that cannot easily be expressed as
`/usr/bin/diff before after`
9 years ago
Toshio Kuratomi d9e29752c1 Add an internal param instructing synchronize to replace localhost with the host that's being ssh'd from 9 years ago
Matt Martz 76925ef613 Merge pull request #2858 from sivel/issue/14064
Add note about precautions of using become with fetch
9 years ago
Matt Martz 3f232beb0a Add note about precautions of using become with fetch. Addresses https://github.com/ansible/ansible/issues/14064 9 years ago
Toshio Kuratomi 0b7469fa90 Fix documentation build 9 years ago
Toshio Kuratomi 76a478a226 Document that synchronize in 2.0.0.x has broken sudo behaviour.
Part of the changes for #13825
9 years ago
Toshio Kuratomi 78b4eac6fc Merge pull request #2722 from mscherer/fix_2630
Fix 2630
9 years ago
Brian Coca 48bd80c9cb adds diff info for file info 9 years ago
Michael Scherer 948900f7fb Fix doc inconsistency (#2630) 9 years ago
Brian Coca f500a2ec53 added mime option to stat module
it uses file magic to now return mime_type and charset of a file as
per output of `file -i /path`
9 years ago
Adam Fields 27f561dca2 added a reference to the template module for clarity 9 years ago
quoing 877daf970d Fix: Default ACL parameters are not correctly handled 9 years ago
Brian Coca db66144386 simplified lowercasing 9 years ago
quoing c93de2f930 Add "default" entry option back (removed in e95bcae), update will translate entry to standard parameters so compatibility with BDS is kept 9 years ago
Brian Coca 8a2459c643 Merge pull request #2590 from noseka1/devel
Fix ini_file module, avoid bracklets in key break idempotence
9 years ago
Ales Nosek 9c74272c9b Fix #2475 ini_file module: bracklets in key break idempotence
Escape the regex special characters in the option name.
9 years ago
krdlab 61a3625ed0 Fix 'stat' module document 9 years ago
Dylan Martin bfa7cdb5c4 improved error message when no handler found 9 years ago
Brian Coca c6fdd3809f fixed typo EEXISTS is actually EEXIST
fixes #2585
9 years ago
Brian Coca 9030ae996c Merge pull request #2569 from gerph/gerph-fix-docs-file
Update documentation for 'file' module to include 'diff_peek'.
9 years ago
Charles Ferguson 176b4103b6 Add documentation to 'file' AnsibleModule definition for internals.
The parameters 'diff_peek' and 'validate' are not expected to be used
by users. They are internal. To make it clear, this change adds the
comments 'Internal use only' to each of those definitions to make
it clear that they are actually used, just not by end-users.
9 years ago
Charles Ferguson 9325c0ae5f Update documentation for 'file' module to include 'diff_peek'.
The 'diff_peek' option isn't documented at all, and provides a
rudimentary check that the content isn't binary. Documentation is
added to explain the option.

The 'validate' option has a declaration, but isn't implemented.
Therefore it may as well be removed from the module.
9 years ago
Charles Paul 1bc0b6ee6a create non-existent ini file
fixing fail_json

more verbose fail msg
9 years ago
Maarten Claes e9c548da41 This fixes copy with the remote_src option
It was broken in 6e37f1dcef when the remote_src was added. Need to
pass the absolute path to copy2 instead of a tuple.
9 years ago
Brian Coca 6e37f1dcef fixed remote_src support, now actually copies and does not move 9 years ago
Timothy Appnel ca12ed5d98 Added the checksum_algo alias to the stats module. 9 years ago
Brian Coca e74dc8c1dd minor doc fixes 9 years ago
Ales Nosek 22790d301a Make the syntax work with Python 2.4 9 years ago
Ales Nosek 7f59773460 ini_file should only change what was specified and nothing more #5860
See also:
http://alesnosek.com/blog/2015/08/03/improving-ansibles-ini-file-module/
9 years ago
Brian Coca 45a9f0b453 since find doesn't make changes, support check mode and gather data for other tasks in check mode 9 years ago
Toshio Kuratomi 3993f4e967 Simplify logic to handle options set to empty string
Fixes #2125
9 years ago
Brian Coca 87b8086163 Merge pull request #2327 from ryansydnor/devel
Add capability for stat module to use more hash algorithms
9 years ago
Brian Coca 486d233cbe Merge pull request #2262 from bcoca/find_regex
added regex support to find
9 years ago
Ryan Sydnor fb10161510 Add capability for stat module to use more hash algorithms
Specifically, the stat module now has a checksum_algorithm parameter.
This lets the module utilize one of the hash algorithms available on the host
to return the checksum of the file.

This change is backwards compatible. The checksum_algorithm defaults to
sha1 and still returns its result to the stat.checksum property.
9 years ago
Brian Coca 2b33c92e7a corrected docs for stat's lnk_source
fixes #12850
9 years ago
Brian Coca 074aad23e7 final form, use_regex now controls if patterns is glob or regex
- fixed cases in which stat fails (dangling symlink)
- now properly reports name of skipped paths
9 years ago