append_text¶
Operation for appending text to a given file.
Example¶
The following example appends text to a file named README.rst:
examples/operations/append_text.yml¶steps:
"Append text to project README":
name: append_text
file_path: "README.rst"
text: |
Example text
============
Example of using `append_text` operation.
Note that the pipe character (|) used above is an example of
yaml’s multi-line string syntax. This task assumes that there’s a file named
README.rst in the working directory and will fail if that file doesn’t exist.
Required context¶
file_pathPath to file relative to the current working directory.
textText that will be appended to
file_path
Optional context¶
prefixdefault:
'n'Text added before appended
textsuffixdefault:
''Text added after appended
text