Skip to content

Instantly share code, notes, and snippets.

@dennisfoconnor
Last active August 29, 2015 14:10
Show Gist options
  • Save dennisfoconnor/96d596271301c828de02 to your computer and use it in GitHub Desktop.
Save dennisfoconnor/96d596271301c828de02 to your computer and use it in GitHub Desktop.
SaltStack File Append trailing line
/path/to/file.sh:
file.append:
- text: |+
export TEMP=foobar
# The trailing line on line 5 will appear in file.sh
@dennisfoconnor
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment