###############################################################################
#  Configures TiddlySpace
#
#
###############################################################################
---

- name: Update APT cache
  action: apt update_cache=true

- name: Install dependencies 
  action: apt pkg={{ item }} force=yes state=present
  with_items: 
    - python-dev

- name: Install pip
  action: apt pkg={{ item }} force=yes state=present
  with_items: 
    - python-setuptools

- name: Install python virtualenv module 
  action: pip name=virtualenv 

- name: Install latest python tiddlywebwiki module
  action: pip name=tiddlywebwiki state=latest

- name: Create tiddlyweb instance
  action: commmand twinstance $tw_instance 
          chdir=/root
          creates=/root/$tw_instance 

- name: Install python tiddlyspace plugin for tiddlyweb
  action: pip name=tiddlywebplugins.tiddlyspace state=latest 

-
