forked from frappe/bench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ubuntu.yml
109 lines (90 loc) · 2.52 KB
/
ubuntu.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
- hosts: localhost
vars:
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
bench_path: "/home/{{ ansible_user_id }}/frappe-bench"
mysql_config_template: "templates/simple_mariadb_config.cnf"
mysql_conf_dir: /etc/mysql/conf.d/
tasks:
# install pre-requisites
- name: install prequisites
apt: pkg={{ item }} state=present
with_items:
# basic installs
- build-essential
- redis-server
# for mariadb
- software-properties-common
# for wkhtmltopdf
- libxrender1
- libxext6
- xfonts-75dpi
- xfonts-base
# for Pillow
- libjpeg8-dev
- zlib1g-dev
- libfreetype6-dev
- liblcms2-dev
- libwebp-dev
- python-tk
# Ensure apt-transport-https
- apt-transport-https
# Python LDAP
- libsasl2-dev
- libldap2-dev
become: yes
become_user: root
- name: install pillow prerequisites for Ubuntu < 14.04
apt: pkg={{ item }} state=present
with_items:
- libtiff4-dev
- tcl8.5-dev
- tk8.5-dev
when: ansible_distribution_version | version_compare('14.04', 'lt')
become: yes
become_user: root
- name: install pillow prerequisites for Ubuntu >= 14.04
apt: pkg={{ item }} state=present
with_items:
- libtiff5-dev
- tcl8.6-dev
- tk8.6-dev
when: ansible_distribution_version | version_compare('14.04', 'ge')
become: yes
become_user: root
- name: Add apt key for node repo
apt_key:
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
id: "68576280"
state: present
become: yes
become_user: root
- name: Add repo
apt_repository:
repo: "deb [arch=amd64,i386] https://deb.nodesource.com/node_6.x {{ ansible_distribution_release }} main"
state: present
register: node_repo
become: yes
become_user: root
- name: Install nodejs 6.x
apt:
name: nodejs
state: present
update_cache: yes
force: yes
become: yes
become_user: root
# install MariaDB
- include: includes/mariadb_ubuntu.yml
# install WKHTMLtoPDF
- include: includes/wkhtmltopdf.yml
# setup MariaDB
- include: includes/setup_mariadb.yml
- debug:
var: run_travis
# setup frappe-bench
- include: includes/setup_bench.yml
when: not without_bench_setup and not run_travis
# setup development environment
- include: includes/setup_dev_env.yml
when: not production and not run_travis and not without_bench_setup