-
-
Save rrauenza/9dfcdf787c78d9324072 to your computer and use it in GitHub Desktop.
how do you do two actions on one file in salt?
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
Salt complains about this: | |
/etc/ntp.conf: | |
- file.comment: | |
- regex: ^server .*ntpd.org | |
- file.append: | |
- text: "myserver1\nmyserver2\n" |
Hack workaround
/etc/ntp.conf:
- file.comment:
- regex: ^server .*ntpd.org
ntp_config:
- file.append:
- name: /etc/ntp.conf
- text: 'myserver1\nmyserver2\n'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/tmp/ntp.conf:
file.comment:
- regex: "^server .*ntpd.org"
file.append:
- text: "myserver1\nmyserver2\n"