Skip to content

Instantly share code, notes, and snippets.

@whiteinge
Last active August 12, 2017 00:22
Show Gist options
  • Select an option

  • Save whiteinge/aff9f582da88d8ab982e47718a92d3ab to your computer and use it in GitHub Desktop.

Select an option

Save whiteinge/aff9f582da88d8ab982e47718a92d3ab to your computer and use it in GitHub Desktop.
Prereq example for optionally draining Apache before updating a web app
include:
- git
apache:
pkg.installed:
- name: httpd
service.running:
- name: httpd
- enable: True
myapp:
git.latest:
- name: https://github.com/myco/myapp.git
- target: /var/www/myapp
- watch_in:
- service: apache
- require:
- pkg: git
drain_apache:
service.dead:
- name: httpd
- prereq:
- git: myapp
@whiteinge

Copy link
Copy Markdown
Author

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