Skip to content

Instantly share code, notes, and snippets.

@kevpie
Last active August 29, 2015 14:22
Show Gist options
  • Save kevpie/ea8884eef51af7f05160 to your computer and use it in GitHub Desktop.
Save kevpie/ea8884eef51af7f05160 to your computer and use it in GitHub Desktop.
How do I get SaltStack to skip managing file for log.sh if it doesn't exist?
#!/bin/sh
exec 2>&1
exec /opt/runit_enabled/bin/runnable.sh
# run.sh source exists and will be managed.
/etc/service/{{ sls }}/run:
file.managed:
- source: salt://{{ sls }}/run.sh
- makedirs: True
#
# log.sh source does not exist and I would like to silently not manage it.
# How to do this?
#
/etc/service/{{ sls }}/log/run:
file.managed:
- source: salt://{{ sls }}/log.sh
- makedirs: True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment