Skip to content

Instantly share code, notes, and snippets.

@ryan-lane
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryan-lane/e448dbc2a72cfe4b8ba8 to your computer and use it in GitHub Desktop.
Save ryan-lane/e448dbc2a72cfe4b8ba8 to your computer and use it in GitHub Desktop.
Ensure my virtualenv is installed:
virtualenv.installed:
- name: /srv/myvenv
Run a command:
cmd.run:
- name: mycommand
Ensure my file is installed:
file.managed:
- name: /srv/requirements.txt
- listen_in:
- virtualenv: Ensure my virtualenv is installed <-- using the ID
- cmd: mycommand <-- using the name
Ensure my other file is installed:
file.managed:
- name: /srv/requirements2.txt
- listen_in:
- cmd: Ensure my virtualenv is installed <-- people copy/paste the command line then forget to change cmd to virtualenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment