summaryrefslogtreecommitdiff
path: root/pkg/windows/ansible/02_bitmask_virtualenv.yml
blob: fed36a0c30c2de435cf70ee4c49de41bdf6a410f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
########################################################################
# Playbook to bootstrap a bitmask development environment in
# a windows base image (install virtualenv)
#
# Make sure to follow the instructions in
# https://docs.ansible.com/ansible/devel/user_guide/windows_setup.html
# before running this playbook.
# You also need to install win_git plugin:
# https://github.com/tivrobo/ansible-win_git
########################################################################

- hosts: all
  gather_facts: false
  tasks:

    # XXX this will fail the first time! need to reboot windows so thatthe PATH variable gets updated
    # https://github.com/ansible/ansible/issues/24333

    - name: git clone bitmask
      win_git:
        repo: "https://github.com/leapcode/bitmask-dev.git"
        dest: "c:\\leap\\bitmask-dev"
        branch: master
        update: yes
        replace_dest: no
        accept_hostkey: yes

    - name: install virtualenv
      win_command: pip install -U virtualenvwrapper-win

    - name: create bitmask virtualenv (with vpn deps)
      win_command: mkvirtualenv.bat bitmask -r c:\leap\bitmask-dev\pkg\requirements-vpn.pip
      ignore_errors: yes

    - name: install bitmask in devmode 
      win_command: pip install -e c:\leap\bitmask-dev
      ignore_errors: yes