Commit graph

72 commits

Author SHA1 Message Date
Dag Wieers
d4bb57d42d Fix the documentation booleans so they use "yes" and "no"
Both modules seboolean and zfs have not been adapted since they defer from the default (either by having a 'null' or special state, or prefering "on"/"off" for state indication.
2013-03-12 13:25:59 +01:00
Maykel Moya
c4ca6fc219 file module should check invalid arguments (fixes #2135) 2013-03-04 12:55:18 +01:00
Michael DeHaan
980949baba Resolve merge 2013-02-26 20:57:36 -05:00
Michael DeHaan
113db71bf6 Merge branch 'copy-diff-take2' of git://github.com/stoned/ansible into better_diff
Conflicts:
	library/file
2013-02-26 20:51:32 -05:00
Stoned Elipot
46b78399d3 Implement --diff for the copy module. 2013-02-25 23:32:52 +01:00
Daniel Hokka Zakrisson
1dadd70d9f Remove choices=BOOLEANS as it is no longer needed 2013-02-23 22:57:36 +01:00
Daniel Hokka Zakrisson
0150f18a3b Use argument type checking to convert to boolean 2013-02-23 19:59:52 +01:00
Daniel Hokka Zakrisson
3f170b54e2 Recurse was added in 1.1 2013-02-17 18:48:17 +01:00
shlomozippel
5dc18da621 Merge recursive file permission setting on directories 2013-02-09 12:01:45 -05:00
Michael DeHaan
1bbe06f92e This implements a basic --check mode which for now is only implemented on template & copy operations. More detail will be shared with the list
shortly.
2013-02-03 20:34:13 -05:00
willthames
a7a0927298 Fix behaviour when file handles a path with tilde
Two problems here
* unchecked exception handling and erroneous assumption as to why
  an exception might fire
* although the file module expands the path, when using file_args
  the unexpanded path is passed.

Expected result: ~/path/to/file should work fine
Actual result: exception is because it doesn't find file with a message
about not being able to get the selinux context
2013-01-07 16:30:29 +10:00
Jan-Piet Mens
45c5a40c39 module_formatter: re-instate code 2012-11-22 07:23:10 +01:00
Jan-Piet Mens
d184f72aa9 DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
Michael DeHaan
6f6559670f chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
Jan-Piet Mens
d069c57974 Reformat code: examples consistently
- added terse syntax to modules.rst
 - added description of special variables to template module
2012-10-23 15:14:01 +02:00
Michael DeHaan
eaaa9e447b Various performance streamlining and making the file features usable in all modules without daisy chaining. 2012-10-20 22:55:09 -04:00
Jonathan Palley
5063e95e78 symlink fix 2012-10-18 20:08:57 +08:00
Michael DeHaan
0b6c55ac81 "force=" code under the file module is problematic, remove it 2012-10-16 18:14:42 -04:00
Michael DeHaan
24170795c4 Use 'path' in file documentation, though src/dest work, it's less intuitive. 2012-10-12 22:08:07 -04:00
Michael DeHaan
37dedf719d implement lookup plugins for arbitrary enumeration over arbitrary things. See the mailing list for some cool examples. 2012-10-12 20:07:05 -04:00
Michael DeHaan
1bd1e3ed1f Added documentation on file force parameter 2012-10-03 20:57:36 -04:00
Michael DeHaan
d404737543 various small doc tweaks 2012-10-02 22:43:46 -04:00
Jan-Piet Mens
c78a0a4a49 Jumbo DOCUMENTATION patch 2012-10-01 09:18:54 +02:00
Michael DeHaan
5256ea7e75 Various tweaking to get the module formatter to work for 'make docs' in the docs project. Likely the templates for other module formatting types will have to change
by the time I'm done.
2012-09-27 21:06:31 -04:00
Jan-Piet Mens
af1f925eea Tweak DOCUMENTATION YAML as per latest 991 2012-09-19 16:09:26 +02:00
Aleksej Romanov
31711062f7 Squashed commit of the following:
commit 80a26a8175b779b707bc08e9d28c451c30ee4ada
Merge: b25b9fd 61e9b27
Author: Michael DeHaan <michael.dehaan@gmail.com>
Date:   Tue Sep 18 21:01:47 2012 -0400

    Merge branch 'devel' of git://github.com/alopropoz/ansible into file-force

commit 61e9b27df2
Merge: 3f6f329 16bf3e1
Author: Aleksej Romanov <alopropoz2@yandex.ru>
Date:   Thu Sep 13 20:48:02 2012 +0700

    Merge remote branch 'upstream/devel' into devel

commit 3f6f3291df
Author: Aleksej Romanov <alopropoz2@yandex.ru>
Date:   Thu Sep 13 20:41:31 2012 +0700

    'force' option for 'file' module.

commit 6223bba941
Author: Aleksej Romanov <alopropoz2@yandex.ru>
Date:   Thu Sep 13 20:40:19 2012 +0700

    changed = True when changing symlink referent, #1008. Needed for tests.
2012-09-18 21:04:42 -04:00
Dag Wieërs
a32ae49bb6 Handle special files just like normal files
As discussed in #923
2012-08-21 23:48:18 +02:00
Michael DeHaan
ed449ed3e2 Fix indentation 2012-08-11 18:39:09 -04:00
Michael DeHaan
3c2eba57fd Make pep8 tests run against the library directory as well, and associated tweaks (mostly to indentation) in the library
directory.
2012-08-11 12:35:58 -04:00
Michael DeHaan
573616780b Merge pull request #838 from sfromm/issue825
Update file module to not recurse when setting ownership
2012-08-10 17:02:23 -07:00
Stephen Fromm
352f8339ea Update file module to not recurse when setting ownership
This updates set_owner_if_different() and set_group_if_different()
to not implicitly recurse when setting ownership (whether user or
group).  It drops the os.system() call and replaces it with os.chown().
Resolves issue #825.

The recursion should be explicit.  A recurse=yes|no option should be
added to the file module.
2012-08-09 22:59:39 -07:00
Michael DeHaan
046942f4cd Relative symlinks don't really work (module bug) and would be confusing anyway, better to be explicit. 2012-08-09 21:46:03 -04:00
Michael DeHaan
5ed21bf443 whitespace + remove deprecated YAML parser (migration script lives in examples/scripts and warning was added
in 0.6 release)
2012-08-06 20:07:02 -04:00
Michael DeHaan
baacde6c74 Add encoding lines to python modules such that they can take unicode options if they are fed them, since the
AnsibleModule stuff no longer base64 encodes for simplicity and speed reasons.
2012-08-02 21:29:10 -04:00
Stephen Fromm
c5066ebabf Add setype to file's argument_spec and remove secontext
secontext is used internally and should not be in argument_spec
2012-08-01 22:24:09 -07:00
Stephen Fromm
060a6a2d15 Fix module_fail_json call when symlink src does not exist 2012-08-01 22:23:02 -07:00
Michael DeHaan
fb8200b9b9 reinstate invalid argument checks where possible, daisy chainee/chained modules turn it off 2012-08-01 19:42:31 -04:00
Michael DeHaan
fe9a05f492 Module consistency and make daisy chaining work with invalid arguments detection. 2012-08-01 00:22:02 -04:00
Michael DeHaan
4782bc1949 Port the file module over to the new common code infrastructure + cleanup some redundant imports since the module code already imports those things. 2012-07-30 21:50:32 -04:00
Jan-Piet Mens
62393ccc7c Fix file module to support = in args; remove superflous call in get_url 2012-07-24 06:40:34 +02:00
Jeremy Smitherman
5107b8354a Removed unused recurse option in file module. 2012-07-12 02:04:51 -04:00
Derek Carter
031af2c0a9 remove UID/GID from output 2012-07-01 17:38:17 -04:00
Derek Carter
11a853377e removed print from debug code of file module 2012-06-29 21:38:31 -04:00
Derek Carter
5119b16c47 file when UID or GID doesn't exist 2012-06-29 20:05:23 -04:00
Fred Alger
9e9dda9e6a Remove unused md5sum function from file module 2012-06-15 00:13:35 -04:00
Michael DeHaan
ecdecdb76f capture possible chown stderr output 2012-05-31 22:19:05 -04:00
Michael DeHaan
bd16c7c4ac Fix parsing error in file module when returning errors. 2012-05-31 22:14:33 -04:00
Stephen Fromm
67ee30f135 Apply logging of arguments to modules (issue #122)
The ohai and facter modules use /usr/bin/logger to log the fact that
they have been invoked.  I added 'import os' to the ping module
so that it could have the same syslog statements as the other modules.
I separated the condensed:
    shlex.split(open(argfile, 'r').read())
into two separate statements similar to the other modules.
2012-05-09 15:19:20 -07:00
Michael DeHaan
473938d1b8 Refactored inventory to make it object oriented, need to make YAML format and executable script
format compatible with this still, and add some tests for INI-style groups of groups
and variables.
2012-05-05 16:31:03 -04:00
Rafal Lewczuk
b6be1f5128 Fix: file module does not remove dangling symlinks 2012-05-01 22:56:37 -04:00