2016-07-27 07:40:52 +00:00
|
|
|
---
|
|
|
|
- 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:
|
|
|
|
|
2016-08-01 05:22:15 +00:00
|
|
|
- name: Add dotdeb apt repository key for Debian < 8
|
|
|
|
apt_key:
|
|
|
|
url: http://www.dotdeb.org/dotdeb.gpg
|
|
|
|
state: present
|
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
when: ansible_distribution == 'Debian' and ansible_distribution_version | version_compare('8', 'lt')
|
|
|
|
|
|
|
|
- name: Add dotdeb apt repository for redis-server for Debian < 8
|
|
|
|
apt_repository:
|
|
|
|
repo: 'deb http://packages.dotdeb.org wheezy all'
|
|
|
|
state: present
|
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
when: ansible_distribution == 'Debian' and ansible_distribution_version | version_compare('8', 'lt')
|
|
|
|
|
2016-07-27 07:40:52 +00:00
|
|
|
# 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
|
|
|
|
- zlib1g-dev
|
|
|
|
- libfreetype6-dev
|
|
|
|
- liblcms2-dev
|
|
|
|
- libwebp-dev
|
|
|
|
- python-tk
|
|
|
|
|
2016-09-12 05:49:34 +00:00
|
|
|
# Ensure apt-transport-https
|
|
|
|
- apt-transport-https
|
|
|
|
|
2016-10-06 09:28:31 +00:00
|
|
|
# Python LDAP
|
|
|
|
- libsasl2-dev
|
|
|
|
- libldap2-dev
|
|
|
|
|
2016-07-27 07:40:52 +00:00
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
|
2016-09-12 05:49:34 +00:00
|
|
|
- name: install pillow prerequisites for Debian < 8
|
2016-07-27 07:40:52 +00:00
|
|
|
apt: pkg={{ item }} state=present
|
|
|
|
with_items:
|
|
|
|
- libjpeg8-dev
|
|
|
|
- libtiff4-dev
|
|
|
|
- tcl8.5-dev
|
|
|
|
- tk8.5-dev
|
|
|
|
when: ansible_distribution_version | version_compare('8', 'lt')
|
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
|
|
|
|
- name: install pillow prerequisites for Debian >= 8
|
|
|
|
apt: pkg={{ item }} state=present
|
|
|
|
with_items:
|
|
|
|
- libjpeg62-turbo-dev
|
|
|
|
- libtiff5-dev
|
|
|
|
- tcl8.5-dev
|
|
|
|
- tk8.5-dev
|
|
|
|
when: ansible_distribution_version | version_compare('8', 'ge')
|
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
|
2016-09-12 05:49:34 +00:00
|
|
|
- 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-27 07:40:52 +00:00
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
|
2016-09-12 05:49:34 +00:00
|
|
|
- name: Add repo
|
|
|
|
apt_repository:
|
|
|
|
repo: "deb [arch=amd64,i386] https://deb.nodesource.com/node_6.x {{ ansible_distribution_release }} main"
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
2016-07-27 07:40:52 +00:00
|
|
|
become: yes
|
|
|
|
become_user: root
|
|
|
|
|
2016-08-02 06:28:28 +00:00
|
|
|
- name: Install nodejs 6.x
|
2016-07-27 07:40:52 +00:00
|
|
|
apt:
|
|
|
|
name: nodejs
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
|
|
|
force: yes
|
|
|
|
become: yes
|
|
|
|
become_user: root
|
2016-09-12 05:49:34 +00:00
|
|
|
|
2016-07-27 07:40:52 +00:00
|
|
|
# install MariaDB
|
|
|
|
- include: includes/mariadb_debian.yml
|
|
|
|
|
|
|
|
# install WKHTMLtoPDF
|
2016-10-13 06:19:56 +00:00
|
|
|
- include: includes/wkhtmltopdf.yml
|
2016-07-27 07:40:52 +00:00
|
|
|
|
|
|
|
# setup MariaDB
|
|
|
|
- include: includes/setup_mariadb.yml
|
|
|
|
|
|
|
|
- debug:
|
|
|
|
var: run_travis
|
|
|
|
|
|
|
|
# setup frappe-bench
|
|
|
|
- include: includes/setup_bench.yml
|
|
|
|
when: not run_travis
|
|
|
|
|
|
|
|
# setup development environment
|
|
|
|
- include: includes/setup_dev_env.yml
|
|
|
|
when: not production and not run_travis
|