Last active
August 29, 2015 14:10
-
-
Save dennisfoconnor/96d596271301c828de02 to your computer and use it in GitHub Desktop.
SaltStack File Append trailing line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/path/to/file.sh: | |
file.append: | |
- text: |+ | |
export TEMP=foobar | |
# The trailing line on line 5 will appear in file.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was a problem I ran into when trying to append the ~/.profile file. You need a trailing line or the command won't execute. The solution can be found in section 8.1.1.2 of YAML v 1.2 Spec (http://www.yaml.org/spec/1.2/spec.html)