2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-23 04:29:02 +00:00

define vars for setting up bench and dev env

This commit is contained in:
Saurabh 2017-08-28 16:34:46 +05:30
parent 00a492f538
commit ead5dbf9a6
10 changed files with 68 additions and 13 deletions

View File

@ -6,8 +6,6 @@
become: yes
become_user: root
vars:
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
bench_path: "/home/{{ ansible_user_id }}/frappe-bench"
mysql_conf_tpl: ../files/mariadb_config.cnf
mysql_secure_installation: True
roles:
@ -17,6 +15,11 @@
- nodejs
- psutil
- name: setup bench and dev environment
hosts: localhost
vars:
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
bench_path: "/home/{{ ansible_user_id }}/frappe-bench"
tasks:
# setup frappe-bench
- include: includes/setup_bench.yml

View File

@ -6,8 +6,6 @@
become: yes
become_user: root
vars:
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
bench_path: "/home/{{ ansible_user_id }}/frappe-bench"
mysql_conf_tpl: ../files/mariadb_config.cnf
mysql_secure_installation: True
roles:
@ -16,6 +14,12 @@
- wkhtmltopdf
- nodejs
- psutil
- name: setup bench and dev environment
hosts: localhost
vars:
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
bench_path: "/home/{{ ansible_user_id }}/frappe-bench"
tasks:
- debug:
var: run_travis

View File

@ -19,3 +19,4 @@
- mariadb-client
- mariadb-common
- libmariadbclient-dev
- python-mysqldb

View File

@ -8,13 +8,18 @@
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} state=present
with_items:
- localhost
- 127.0.0.1
- ::1
ignore_errors: yes
- name: Add .my.cnf
template: src=my.cnf.j2 dest=/root/.my.cnf owner=root group=root mode=0600
- name: Set root Password
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} state=present
with_items:
- 127.0.0.1
- ::1
ignore_errors: yes
- name: Reload privilege tables
command: 'mysql -ne "{{ item }}"'
with_items:

View File

@ -14,6 +14,7 @@
- name: Install node v6
yum: name=nodejs state=present
when: ansible_os_family == 'RedHat'
- name: Add apt key for node repo
apt_key:

View File

@ -0,0 +1,16 @@
---
- name: install pillow prerequisites for Debian < 8
apt: pkg={{ item }} state=present
with_items:
- libtiff4-dev
- tcl8.5-dev
- tk8.5-dev
when: ansible_distribution_version | version_compare('8', 'lt')
- name: install pillow prerequisites for Debian >= 8
apt: pkg={{ item }} state=present
with_items:
- libtiff5-dev
- tcl8.5-dev
- tk8.5-dev
when: ansible_distribution_version | version_compare('8', 'ge')

View File

@ -51,10 +51,8 @@
- htop
- libcrypto++-dev
- libfreetype6-dev
- libjpeg8-dev
- liblcms2-dev
- libssl-dev
- libtiff5-dev
- libwebp-dev
- libxext6
- libxrender1
@ -69,8 +67,6 @@
- redis-server
- screen
- supervisor
- tcl8.6-dev
- tk8.6-dev
- vim
- xfonts-75dpi
- xfonts-base
@ -78,10 +74,17 @@
- apt-transport-https
- libsasl2-dev
- libldap2-dev
- libjpeg8-dev
when: ansible_os_family == 'Debian' or ansible_distribution == 'Ubuntu'
- include: ubuntu.yml
when: ansible_distribution == 'Ubuntu'
- include: debian.yml
when: ansible_os_family == 'Debian'
# Prerequisite for MACOS
- name: install prequisites
- name: install prequisites for macos
homebrew: name={{ item }} state=present
with_items:
- cmake

View File

@ -0,0 +1,16 @@
---
- name: install pillow prerequisites for Ubuntu < 14.04
apt: pkg={{ item }} state=present force=yes
with_items:
- libtiff4-dev
- tcl8.5-dev
- tk8.5-dev
when: ansible_distribution_version | version_compare('14.04', 'lt')
- name: install pillow prerequisites for Ubuntu >= 14.04
apt: pkg={{ item }} state=present force=yes
with_items:
- libtiff5-dev
- tcl8.6-dev
- tk8.6-dev
when: ansible_distribution_version | version_compare('14.04', 'ge')

View File

@ -38,11 +38,11 @@
become_user: root
when: ansible_distribution == 'Debian' and ansible_distribution_version | version_compare('8', 'lt')
- name: Install libselinux-python
- name: Install python selinux
apt: pkg={{ item }} state=present force=yes
with_items:
- build-essential
- python-dev
- python-pip
- libselinux-python
- python-selinux
when: ansible_os_family == 'Debian' or ansible_os_family == 'Ubuntu'

View File

@ -16,6 +16,12 @@
- wkhtmltopdf
- nodejs
- psutil
- name: setup bench and dev environment
hosts: localhost
vars:
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
bench_path: "/home/{{ ansible_user_id }}/frappe-bench"
tasks:
- debug:
var: run_travis