Skip to content

Instantly share code, notes, and snippets.

@jburnham
Created February 5, 2012 00:40
Show Gist options
  • Save jburnham/1741509 to your computer and use it in GitHub Desktop.
Save jburnham/1741509 to your computer and use it in GitHub Desktop.
saltstack extending files
/etc/examplefile:
file:
- user: root
- group: root
- mode: 600
- append
- text:
- This is line 1
include:
- line1
extend:
/etc/examplefile:
file:
- append
- text:
- This is line 2
19:38:57,866 [salt.state ][INFO ] Executing state file.append for /etc/examplefile
19:38:57,868 [salt.state ][INFO ] {'new': ['This is line 2']}
19:38:57,873 [salt.minion ][INFO ] Returning information for job: 20120204193857301823
19:38:57,876 [salt.master ][INFO ] AES payload received with command _return
19:38:57,876 [salt.master ][INFO ] Got return from localhost.localdomain for job 20120204193857301823
localhost.localdomain:
----------
State: - file
Name: /etc/examplefile
Function: append
Result: True
Comment: Appended 1 lines
Changes: new: ('This is line 2',)
base:
'*':
- line1
- line2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment