forked from joemccann/dillinger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yml
More file actions
48 lines (48 loc) · 1.38 KB
/
deploy.yml
File metadata and controls
48 lines (48 loc) · 1.38 KB
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
38
39
40
41
42
43
44
45
46
47
48
# Expects Debian Jessie
# To use, create an inventory.ini file like so:
# dillinger ansible_ssh_user=root ansible_ssh_host=104.236.249.30
# Where the IP address is the ip of the server to deploy dillinger to.
# Then run the following command:
# ansible-playbook -i inventory.ini deploy.yml
---
- hosts: all
tasks:
- name: Enabling debian backports
command: bash -c 'echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list'
creates=/etc/apt/sources.lists.d/backports.list
- name: Update system
apt:
update_cache=true
upgrade=dist
- name: Installing rsync
apt:
name=rsync
- name: Ensure directory exists
file:
path=/tmp/dillinger
state=directory
mode=0755
- name: Uploading project
synchronize:
src=.
dest=/tmp/dillinger
recursive=yes
delete=yes
- name: Installing docker-py
apt:
name=python-docker
- name: Installing docker
apt:
name=docker.io
- name: Build dillinger
docker_image:
name=joemccann/dillinger
tag=latest
path=/tmp/dillinger
state=build
- name:
command: cp /tmp/dillinger/dillinger.service /etc/systemd/system
creates=/etc/systemd/system/dillinger.service
- service:
name=dillinger
state=started