Commit Graph

43 Commits (3b8f69bac8feb8d3a9fc17c4a57ca0a1237014f4)

Author SHA1 Message Date
jtsoi 8c11624f14 Typo in example, extra space breaks playbook. 12 years ago
gw0 [http://gw.tnode.com/] acd5426094 Improved backrefs example in lineinfile. 12 years ago
mavimo cafc12c680 Double quoted version_added in documentation 12 years ago
tin ca581840ef Added additional lineinfile documentation.
A little more unit testing.
12 years ago
tin f9b70822d2 Fixed to the lineinfile module.
Added the backrefs parameter to the lineinfile module.
Added tests for the backrefs functionality of the lineinfile module.
12 years ago
Piotr Kweclich 2e4c02f93e disabled appending file with garbage when regexp didn't match. 12 years ago
Dag Wieers 50b7964f8e 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.
12 years ago
Andreas Piesk 84ee05a3c0 allow use of backrefs in lineinfile 12 years ago
Daniel Hokka Zakrisson 93f02d614b 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 578ec127fb Remove choices=BOOLEANS as it is no longer needed 12 years ago
Michael DeHaan c86b34dae1 Lots of docsite additions for new features + cleanup lineinfile YAML docs 12 years ago
Daniel Hokka Zakrisson df798d0688 Use argument type checking to convert to boolean 12 years ago
Michael DeHaan b739a5860a Merge branch 'lineinfile_improvements' of git://github.com/leucos/ansible into devel
Conflicts:
	library/lineinfile
12 years ago
Daniel Hokka Zakrisson 274f15b52c Fix version_added for insertbefore in lineinfile 12 years ago
Michel Blanc 633fdede38 Fixes duplicate code
Fixed duplicate call for file attributes checking
12 years ago
Michel Blanc 008dc4831e 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 0f166d870a teach lineinfile module to support --check mode 12 years ago
Michael DeHaan 5f829f9926 Add versionadded element to new option, fix YAML formatting 12 years ago
Yves Dorfsman 83ce1b2dc5 Modified to follow Daniel Hokka Zakrisson's recommendations. 12 years ago
Yves Dorfsman 4de1b4e8a9 Added an insertbefore option. 12 years ago
Hubert Feyrer e2158b661d Add Linux-style path for sudoers file, to be consistent with other examples. 12 years ago
Hubert Feyrer d4b9de643b 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 27ff22610d Fix lineinfile docs formatting 12 years ago
Yves Dorfsman 05a3876dc9 Clarification on how to use insertafter with a regex. 12 years ago
jkleint d732b25828 Clarify that lineinfile uses Python regexes. 12 years ago
Jan-Piet Mens caf003c813 DOCUMENTATION strings 12 years ago
Michael DeHaan 663a8fef3f chmod -x for all module files in source checkout 12 years ago
Brian Coca 5ea260f44b 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 c0747b7baa pep8 fixes 12 years ago
Serge van Ginderachter 47d882f374 Fix typo 12 years ago
Dag Wieers 1e3dcfce4b 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 feab57e270 Reformat code: examples consistently
- added terse syntax to modules.rst
 - added description of special variables to template module
12 years ago
Dag Wieers 70b063ce0e Use the standard 'dest' option for target files, make 'name' an alias 12 years ago
Michael DeHaan 6600f7b7ac Merge pull request #1170 from jpmens/docspatch01
Jumbo DOCUMENTATION patch
12 years ago
Jan-Piet Mens a72a6e42c5 Added attribution to all module DOCUMENTATION strings 12 years ago
Jan-Piet Mens e620fed755 Jumbo DOCUMENTATION patch 12 years ago
Michael DeHaan 83f277cfe6 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 5a75433ce9 Added DOCUMENTATION to lineinfile module 12 years ago
Michael DeHaan 565f336182 lineinfile should use 'search' everywhere 12 years ago
Michael DeHaan 14a9c3ab9e Line in file regexep should match a portion of the line, not the whole line! 12 years ago
Michael DeHaan aa704a6111 backuplocal => backup_local for API standardization reasons 12 years ago
Daniel Hokka Zakrisson 2a8b92954f Add backups to lineinfile 12 years ago
Daniel Hokka Zakrisson ed8e31d618 Add a lineinfile module 12 years ago