Add basic README blob master
[LocalChat.git] / ansible / roles / localchat-server / tasks / main.yml
Ben Tasker 1 ---
2
Ben Tasker 3 - name: Install Utils
Ben Tasker 4 apt: name={{item}} state=installed
5 with_items:
Ben Tasker 6 - python-pip
Ben Tasker 7 - python-sqlite
Ben Tasker 8 - unzip
9 tags: deps
10
11 - name: Install Python Dependancies
12 pip: name={{item}} state=present
13 with_items:
14 - flask
15 - werkzeug
16 - bcrypt
17 - gnupg
18 - pyopenssl
Ben Tasker 19 tags: deps
20
21
Ben Tasker 22 - name: Create install dir
23 file: path={{localchat_server_install_path}} state=directory
24
25 - name: Download and install Server
26 unarchive:
27 src: "https://github.com/bentasker/LocalChat/archive/v{{localchat_server_install_ver}}.zip"
28 dest: "{{localchat_server_install_path}}"
29 remote_src: yes
30
31 - name: Symlink latest
32 file:
33 src: "{{localchat_server_install_path}}/LocalChat-{{localchat_server_install_ver}}/server/LocalChat.py"
34 dest: "{{localchat_server_install_path}}/LocalChat.py"
35 state: link
Ben Tasker 36
Ben Tasker 37 - name: Create Unit File
38 template: src=localchat.service dest=/etc/systemd/system/localchat.service
39 notify: reload systemd
40
41
42 - name: Start server
43 command: systemctl start localchat
44
45
46