2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 08:16:28 +00:00
bench/playbooks/develop/debian.yml
2016-08-03 01:29:34 -07:00

118 lines
2.8 KiB
YAML
Executable File

---
- 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/
wkhtmltopdf_version: 0.12.2.1
tasks:
- 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')
# 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
become: yes
become_user: root
- name: install pillow prerequisites for Debian < 8
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
- name: Get nodejs 6.x bash script
get_url:
url: 'https://deb.nodesource.com/setup_6.x'
dest: '/tmp/setup_6.x'
mode: 0644
become: yes
become_user: root
- name: Run nodejs bash script
command: /bin/bash /tmp/setup_6.x
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_debian.yml
# install WKHTMLtoPDF
- include: includes/wkhtmltopdf_ubuntu_debian.yml
# 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