Skip to content

Instantly share code, notes, and snippets.

@motorcityadam
Created April 24, 2015 03:51
Show Gist options
  • Save motorcityadam/523ffc1486cbbe13ded9 to your computer and use it in GitHub Desktop.
Save motorcityadam/523ffc1486cbbe13ded9 to your computer and use it in GitHub Desktop.
- name: Create activation scripts for the specified Python virtual environments
template:
src: virtualenv_postactivate.j2
dest: "{{ python_virtualenv_home_dir }}/{{ item.environment.name }}/bin/postactivate"
sudo: yes
sudo_user: "{{ python_user }}"
with_items: python_virtualenvs_variables
when: >
python_virtualenv_install and python_virtualenvs|length > 0 and
python_virtualenvs_variables and python_virtualenvs_variables|length > 0
- name: Create deactivation scripts for the specified Python virtual environments
template:
src: virtualenv_postdeactivate.j2
dest: "{{ python_virtualenv_home_dir }}/{{ item.environment.name }}/bin/postdeactivate"
sudo: yes
sudo_user: "{{ python_user }}"
with_items: python_virtualenvs_variables
when: >
python_virtualenv_install and python_virtualenvs|length > 0 and
python_virtualenvs_variables and python_virtualenvs_variables|length > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment