Commit Graph

35 Commits (49a2d86d03667313b64614b989cc3ca47419884f)

Author SHA1 Message Date
Daniel Hokka Zakrisson 79930d931a Merge pull request #2187 from dhozac/argument-type-check
Add type checking for module arguments, converting as much as possible
12 years ago
Daniel Hokka Zakrisson 1dadd70d9f Remove choices=BOOLEANS as it is no longer needed 12 years ago
Michael DeHaan 1f9f590938 Lots of docsite additions for new features + cleanup lineinfile YAML docs 12 years ago
Daniel Hokka Zakrisson 0150f18a3b Use argument type checking to convert to boolean 12 years ago
Michael DeHaan 7a21cbfc6c Merge branch 'lineinfile_improvements' of git://github.com/leucos/ansible into devel
Conflicts:
	library/lineinfile
12 years ago
Daniel Hokka Zakrisson 37ef7d82c4 Fix version_added for insertbefore in lineinfile 12 years ago
Michel Blanc 8d78496adc Fixes duplicate code
Fixed duplicate call for file attributes checking
12 years ago
Michel Blanc e64016f2af Improves lineinfile and adds file attr option
Added path expanding for dest in lineinfile
Added common file arguments to lineinfile so the module gets owner,
group, mode and SE options.
Decorated existing example to demonstate usage of file options and added
a couple more examples
Message is not set accordingly when file attributes were changed
'absent' handling code now handles the case where the file doesn't
exists (was issuing a Traceback before)
File attribute handling code has been added to the 'absent' handling
function too.
File attributes handling has been grouped in 'def check_file' since it's
required in both places.
'absent' mode now returns a message like it's counterpart 'present',
telling if file attributes were altered and if lines have matched.
12 years ago
Kavin Kankeshwar fe9933ee47 teach lineinfile module to support --check mode 12 years ago
Michael DeHaan d96d16c0dc Add versionadded element to new option, fix YAML formatting 12 years ago
Yves Dorfsman 1cc9fa0fc8 Modified to follow Daniel Hokka Zakrisson's recommendations. 12 years ago
Yves Dorfsman fb933cb30c Added an insertbefore option. 12 years ago
Hubert Feyrer 401d67a8ba Add Linux-style path for sudoers file, to be consistent with other examples. 12 years ago
Hubert Feyrer b5adbfbef4 Add an example on how to *add* a %wheel line to sudo - tricky as it has
a colon, which needs some special attention.
12 years ago
Michael DeHaan 83fcdff9aa Fix lineinfile docs formatting 12 years ago
Yves Dorfsman b0599ae2d9 Clarification on how to use insertafter with a regex. 12 years ago
jkleint 7c8fa2cb6f Clarify that lineinfile uses Python regexes. 12 years ago
Jan-Piet Mens d184f72aa9 DOCUMENTATION strings 12 years ago
Michael DeHaan 6f6559670f chmod -x for all module files in source checkout 12 years ago
Brian Coca 924dc5006c fix case in which file is created and backup is requested but fails, not it just doesn't attempt to backup the missing file
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
12 years ago
Michael DeHaan 8d3f73d562 pep8 fixes 12 years ago
Serge van Ginderachter 8a823acf20 Fix typo 12 years ago
Dag Wieers 835d7d854e Add option create= to lineinfile module
We use the lineinfile module to modify configuration files of a proprietary application. This application reads configuration options from files, but does not require those files to exist (if the default options are fine). However this application may modify the configuration file at will, so we cannot copy or template those files. And after a silent install the configuration may not exist (depending on the response file).

Whatever the case, during deployment we need to make sure some configuration options are set after the installation.

So the cleanest way to handle this situation is to allow the lineinfile module to create the file if it is missing (and this is the expected behavior). When I proposed this behavior, @sergevanginderachter needed the same functionality and was now working around it as well.
12 years ago
Jan-Piet Mens d069c57974 Reformat code: examples consistently
- added terse syntax to modules.rst
 - added description of special variables to template module
12 years ago
Dag Wieers 580197f197 Use the standard 'dest' option for target files, make 'name' an alias 12 years ago
Michael DeHaan 2f14545f2c Merge pull request #1170 from jpmens/docspatch01
Jumbo DOCUMENTATION patch
12 years ago
Jan-Piet Mens a790c399f4 Added attribution to all module DOCUMENTATION strings 12 years ago
Jan-Piet Mens c78a0a4a49 Jumbo DOCUMENTATION patch 12 years ago
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.
12 years ago
Jan-Piet Mens 78c04b2cd8 Added DOCUMENTATION to lineinfile module 12 years ago
Michael DeHaan 3276c2f0c4 lineinfile should use 'search' everywhere 12 years ago
Michael DeHaan 9998d2985c Line in file regexep should match a portion of the line, not the whole line! 12 years ago
Michael DeHaan 4223442992 backuplocal => backup_local for API standardization reasons 12 years ago
Daniel Hokka Zakrisson 25b34ddb60 Add backups to lineinfile 12 years ago
Daniel Hokka Zakrisson 61bc4bc0ed Add a lineinfile module 12 years ago