2016-03-16 14:41:55 +05:30
|
|
|
---
|
|
|
|
- hosts: localhost
|
|
|
|
vars:
|
2016-05-25 16:17:48 +05:30
|
|
|
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
|
|
|
|
bench_path: "/home/{{ ansible_user_id }}/frappe-bench"
|
2016-03-16 14:41:55 +05:30
|
|
|
mysql_config_template: "templates/simple_mariadb_config.cnf"
|
2016-03-17 12:59:44 +05:30
|
|
|
mysql_conf_dir: /etc/mysql/conf.d/
|
2016-03-16 14:41:55 +05:30
|
|
|
|
|
|
|
tasks:
|
2016-03-16 15:24:19 +05:30
|
|
|
|
|
|
|
# install pre-requisites
|
|
|
|
- name: install prequisites
|
|
|
|
apt: pkg={{ item }} state=present
|
|
|
|
with_items:
|
2016-03-17 12:59:44 +05:30
|
|
|
# basic installs
|
|
|
|
- build-essential
|
|
|
|
- redis-server
|
2016-03-16 15:24:19 +05:30
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2016-09-12 11:19:34 +05:30
|
|
|
# Ensure apt-transport-https
|
|
|
|
- apt-transport-https
|
|
|
|
|
2016-10-06 14:58:31 +05:30
|
|
|
# Python LDAP
|
|
|
|
- libsasl2-dev
|
|
|
|
- libldap2-dev
|
|
|
|
|
2016-03-16 15:24:19 +05:30
|
|
|
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
|
2016-05-04 13:23:33 +05:30
|
|
|
when: ansible_distribution_version | version_compare('14.04', 'lt')
|
2016-03-17 12:59:44 +05:30
|
|
|
become: yes
|
|
|
|
become_user: root
|
2016-03-16 15:24:19 +05:30
|
|
|
|
2016-05-04 13:23:33 +05:30
|
|
|
- name: install pillow prerequisites for Ubuntu >= 14.04
|
2016-03-16 15:24:19 +05:30
|
|
|
apt: pkg={{ item }} state=present
|
|
|
|
with_items:
|
|
|
|
- libtiff5-dev
|
|
|
|
- tcl8.6-dev
|
|
|
|
- tk8.6-dev
|
2016-07-27 13:10:52 +05:30
|
|
|
when: ansible_distribution_version | version_compare('14.04', 'ge')
|
2016-03-17 12:59:44 +05:30
|
|
|
become: yes
|
|
|
|
become_user: root
|
2016-03-16 15:24:19 +05:30
|
|
|
|
2016-09-12 11:19:34 +05:30
|
|
|
- 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
|
2016-07-26 12:35:04 +05:30
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
|
2016-09-12 11:19:34 +05:30
|
|
|
- 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
|
2016-07-25 12:17:43 +05:30
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
|
2016-08-03 12:52:08 +05:30
|
|
|
- name: Install nodejs 6.x
|
2016-07-26 12:35:04 +05:30
|
|
|
apt:
|
|
|
|
name: nodejs
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
|
|
|
force: yes
|
2016-07-25 12:17:43 +05:30
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
|
2016-03-16 15:24:19 +05:30
|
|
|
# install MariaDB
|
|
|
|
- include: includes/mariadb_ubuntu.yml
|
|
|
|
|
|
|
|
# install WKHTMLtoPDF
|
2016-10-13 11:49:56 +05:30
|
|
|
- include: includes/wkhtmltopdf.yml
|
2016-03-16 15:24:19 +05:30
|
|
|
|
2016-03-16 14:41:55 +05:30
|
|
|
# setup MariaDB
|
|
|
|
- include: includes/setup_mariadb.yml
|
2016-03-16 15:24:19 +05:30
|
|
|
|
2016-06-28 12:11:06 +05:30
|
|
|
- debug:
|
|
|
|
var: run_travis
|
|
|
|
|
2016-03-16 14:41:55 +05:30
|
|
|
# setup frappe-bench
|
|
|
|
- include: includes/setup_bench.yml
|
2016-08-01 11:14:01 +05:30
|
|
|
when: not without_bench_setup and not run_travis
|
2016-05-23 16:26:13 +05:30
|
|
|
|
|
|
|
# setup development environment
|
|
|
|
- include: includes/setup_dev_env.yml
|
2016-08-01 12:09:54 +05:30
|
|
|
when: not production and not run_travis and not without_bench_setup
|