summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/lineinfile (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Typo fixes and other bits and bobs (#83672)Lee Garrett2024-07-271-1/+1
| | | Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
* atomic_move - fix preserving extended acls (#82818)Sloane Hertel2024-03-183-3/+59
| | | | | | | | | | | | | | | | | * use copystat to copy as many attributes as possible before os.rename update unit test mocks for updated method of attribute preservation add integration test for lineinfile case remove erroneous `- meta: end_play` from lineinfile test suite * add keep_dest_attrs parameter to control whether src attributes are copied initially, and for existing destinations, whether the src is updated using the dest before being renamed consolidate with copy unsetting extended attrs ci_complete
* check if there attributes to set (#78707)Danny Luwel2023-12-061-0/+27
| | | Fixes: #76727
* Add lineinfile integration test for removing a line that has already been ↵Sloane Hertel2023-09-261-0/+21
| | | | | removed (#81762) ci_complete ci_coverage
* Fix lineinfile test (#75785)Brian Coca2021-09-254-143/+144
| | | | | * fix remote test after controller split * other files had it too!
* lineinfile - improve test coverage (#74122)David Shrewsbury2021-04-061-0/+53
|
* lineinfile - add search_string parameter for non-regexp searching (#70647)Jose Angel Munoz2021-02-026-1/+512
| | | | | * Add tests for search_string * Improve examples * Add changelog
* lineinfile - don't run os.makedirs on empty dir path (#63921)Robert Osowiecki2019-10-291-0/+18
| | | | | | * Fix #63919: don't run os.makedirs on empty dir path * integration test for lineinfile create: yes without path
* lineinfile - use correct index value when inserting at the end (#63696)Sam Doran2019-10-221-0/+30
|
* lineinfile - properly insert line when line exists and backrefs are enabled ↵Sam Doran2019-10-221-12/+23
| | | | | | | | | (#63763) Use a separate variable for the boolean test rather than having the same variable sometimes be a boolean and sometimes be a regular expression match object Add integration tests to cover this scenario
* lineinfile - fix bug with insertbefore/insertafter and firstmatch (#63194)Andrey Klychkov2019-10-083-0/+287
|
* Lineinfile must not insert lines multiples times with ↵Jérémy Lecour2018-12-171-18/+46
| | | | | | | | | | | | | | | | | | | | | | insertbefore/insertafter (#49409) * Change test suite to fit expected behaviour This reverts some changes from ansible/ansible@723daf3 If a line is found in the file, exactly or via regexp matching, it must not be added again. insertafter/insertbefore options are used only when a line is to be inserted, to specify where it must be added. * Implement the change in behaviour mentioned in the previous commit * Fix comment to reflect what the code does * Set the correct return message. In these cases, the lines are added, not replaced. * Add a changelog
* Use proper index value with insertbefore on a one line file (#46071)Sam Doran2018-10-031-0/+31
| | | Add tests and changelog
* Update Shippable integration test groups. (#43118)Matt Clay2018-07-241-1/+1
| | | | | | | * Update Shippable integration test groups. * Update integration test group aliases. * Rebalance AWS and Azure tests with extra group. * Rebalance Windows tests with another group.
* Add warning when using an empty regexp in lineinfile (#42013)Sam Doran2018-06-301-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | * Revert "Account for empty string regexp in lineinfile (#41451)" This reverts commit 4b5b4a760c5217bdfd1d45efd224e2762e9898b0. * Use context managers for interacting with files * Store line and regexp parameters in a variable * Add warning when regexp is an empty string * Remove '=' from error messages * Update warning message and add changelog * Add tests * Improve warning message Offer an equivalent regexp that won't trigger the warning. Update tests to match new warning. * Add porting guide entry for lineinfile change
* Account for empty string regexp in lineinfile (#41451)Sam Doran2018-06-251-0/+34
| | | | | | | | | | | | * Use context managers for interacting with files * Account for empty string as regexp Rather than explicitly testing for None, also test for an empty string which will evaluate to False. An empty string regexp matches every line, which ends up replacing the incorrect line. * Store line parameter in a variable * Add tests
* Skip if insertbefore BOF until later (#41767)Sam Doran2018-06-251-5/+14
| | | | | If a line match is found in the file and no regexp is specified, insertbefore would improperly try to add a line if set to BOF. Add tests for this scenario.
* Check for regexp match when using insertbefore or insertafter (#36474)Sam Doran2018-02-213-0/+186
| | | | Add tests to cover this scenario Fixes #36156
* Fix lineinfile to insert line when pattern exists elsewhere in the file. ↵Sam Doran2018-02-013-93/+282
| | | | | | | | | | | | | | | | (#33393) * Insert lines before or after when the regexp exists elsewhere in the file * Correct filter syntax in lineinfile integration test * Use multi-line YAML syntax on lineinfile tests Unify indentation * Add lineinfile tests for same line matched to different regexps * Remove debug statement from test
* Initial ansible-test implementation. (#18556)Matt Clay2016-11-301-0/+1
|
* Migrate Linux CI roles to test targets. (#17997)Matt Clay2016-10-135-0/+403