mirror of
https://github.com/frappe/bench.git
synced 2025-02-03 19:38:24 +00:00
define vars for setting up bench and dev env
This commit is contained in:
parent
00a492f538
commit
ead5dbf9a6
@ -6,8 +6,6 @@
|
|||||||
become: yes
|
become: yes
|
||||||
become_user: root
|
become_user: root
|
||||||
vars:
|
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_conf_tpl: ../files/mariadb_config.cnf
|
||||||
mysql_secure_installation: True
|
mysql_secure_installation: True
|
||||||
roles:
|
roles:
|
||||||
@ -17,6 +15,11 @@
|
|||||||
- nodejs
|
- nodejs
|
||||||
- psutil
|
- 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:
|
tasks:
|
||||||
# setup frappe-bench
|
# setup frappe-bench
|
||||||
- include: includes/setup_bench.yml
|
- include: includes/setup_bench.yml
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
become: yes
|
become: yes
|
||||||
become_user: root
|
become_user: root
|
||||||
vars:
|
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_conf_tpl: ../files/mariadb_config.cnf
|
||||||
mysql_secure_installation: True
|
mysql_secure_installation: True
|
||||||
roles:
|
roles:
|
||||||
@ -16,6 +14,12 @@
|
|||||||
- wkhtmltopdf
|
- wkhtmltopdf
|
||||||
- nodejs
|
- nodejs
|
||||||
- psutil
|
- 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:
|
tasks:
|
||||||
- debug:
|
- debug:
|
||||||
var: run_travis
|
var: run_travis
|
||||||
|
@ -19,3 +19,4 @@
|
|||||||
- mariadb-client
|
- mariadb-client
|
||||||
- mariadb-common
|
- mariadb-common
|
||||||
- libmariadbclient-dev
|
- libmariadbclient-dev
|
||||||
|
- python-mysqldb
|
||||||
|
@ -8,13 +8,18 @@
|
|||||||
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} state=present
|
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} state=present
|
||||||
with_items:
|
with_items:
|
||||||
- localhost
|
- localhost
|
||||||
- 127.0.0.1
|
|
||||||
- ::1
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Add .my.cnf
|
- name: Add .my.cnf
|
||||||
template: src=my.cnf.j2 dest=/root/.my.cnf owner=root group=root mode=0600
|
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
|
- name: Reload privilege tables
|
||||||
command: 'mysql -ne "{{ item }}"'
|
command: 'mysql -ne "{{ item }}"'
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
- name: Install node v6
|
- name: Install node v6
|
||||||
yum: name=nodejs state=present
|
yum: name=nodejs state=present
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: Add apt key for node repo
|
- name: Add apt key for node repo
|
||||||
apt_key:
|
apt_key:
|
||||||
|
16
playbooks/develop/roles/prerequisites/tasks/debian.yml
Normal file
16
playbooks/develop/roles/prerequisites/tasks/debian.yml
Normal 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')
|
@ -51,10 +51,8 @@
|
|||||||
- htop
|
- htop
|
||||||
- libcrypto++-dev
|
- libcrypto++-dev
|
||||||
- libfreetype6-dev
|
- libfreetype6-dev
|
||||||
- libjpeg8-dev
|
|
||||||
- liblcms2-dev
|
- liblcms2-dev
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- libtiff5-dev
|
|
||||||
- libwebp-dev
|
- libwebp-dev
|
||||||
- libxext6
|
- libxext6
|
||||||
- libxrender1
|
- libxrender1
|
||||||
@ -69,8 +67,6 @@
|
|||||||
- redis-server
|
- redis-server
|
||||||
- screen
|
- screen
|
||||||
- supervisor
|
- supervisor
|
||||||
- tcl8.6-dev
|
|
||||||
- tk8.6-dev
|
|
||||||
- vim
|
- vim
|
||||||
- xfonts-75dpi
|
- xfonts-75dpi
|
||||||
- xfonts-base
|
- xfonts-base
|
||||||
@ -78,10 +74,17 @@
|
|||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
- libsasl2-dev
|
- libsasl2-dev
|
||||||
- libldap2-dev
|
- libldap2-dev
|
||||||
|
- libjpeg8-dev
|
||||||
when: ansible_os_family == 'Debian' or ansible_distribution == 'Ubuntu'
|
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
|
# Prerequisite for MACOS
|
||||||
- name: install prequisites
|
- name: install prequisites for macos
|
||||||
homebrew: name={{ item }} state=present
|
homebrew: name={{ item }} state=present
|
||||||
with_items:
|
with_items:
|
||||||
- cmake
|
- cmake
|
||||||
|
16
playbooks/develop/roles/prerequisites/tasks/ubuntu.yml
Normal file
16
playbooks/develop/roles/prerequisites/tasks/ubuntu.yml
Normal 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')
|
@ -38,11 +38,11 @@
|
|||||||
become_user: root
|
become_user: root
|
||||||
when: ansible_distribution == 'Debian' and ansible_distribution_version | version_compare('8', 'lt')
|
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
|
apt: pkg={{ item }} state=present force=yes
|
||||||
with_items:
|
with_items:
|
||||||
- build-essential
|
- build-essential
|
||||||
- python-dev
|
- python-dev
|
||||||
- python-pip
|
- python-pip
|
||||||
- libselinux-python
|
- python-selinux
|
||||||
when: ansible_os_family == 'Debian' or ansible_os_family == 'Ubuntu'
|
when: ansible_os_family == 'Debian' or ansible_os_family == 'Ubuntu'
|
||||||
|
@ -16,6 +16,12 @@
|
|||||||
- wkhtmltopdf
|
- wkhtmltopdf
|
||||||
- nodejs
|
- nodejs
|
||||||
- psutil
|
- 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:
|
tasks:
|
||||||
- debug:
|
- debug:
|
||||||
var: run_travis
|
var: run_travis
|
||||||
|
Loading…
x
Reference in New Issue
Block a user