mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Fix #5679 again after recent changes in core
This commit is contained in:
parent
0b0ca95731
commit
2bfaacd170
2 changed files with 20 additions and 3 deletions
|
@ -209,3 +209,21 @@
|
|||
that:
|
||||
- "result.stat.md5 == 'fef1d487711facfd7aa2c87d788c19d9'"
|
||||
|
||||
|
||||
- name: insert a multiple lines at the end of the file
|
||||
lineinfile: dest={{output_dir}}/test.txt state=present line="This is a line\nwith \\\n character" insertafter="EOF"
|
||||
register: result
|
||||
|
||||
- name: assert that the multiple lines was inserted
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "result.msg == 'line added'"
|
||||
|
||||
- stat: path={{output_dir}}/test.txt
|
||||
register: result
|
||||
|
||||
- name: assert test md5 matches after insert the multiple lines
|
||||
assert:
|
||||
that:
|
||||
- "result.stat.md5 == 'c2510d5bc8fdef8e752b8f8e74c784c2'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue