2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-13 16:56:33 +00:00

comnify distribution wise setup and install prerequisites separately

This commit is contained in:
Saurabh 2017-08-29 18:51:47 +05:30
parent 2525503429
commit 22a826bbde
6 changed files with 135 additions and 101 deletions

View File

@ -9,7 +9,6 @@
mysql_conf_tpl: ../files/mariadb_config.cnf
mysql_secure_installation: True
roles:
- prerequisites
- mariadb
- wkhtmltopdf
- nodejs

View File

@ -1,14 +1,45 @@
---
- hosts: localhost
- include: setup_essentials.yml
- include: ../prerequisites/install_prerequisites.yml
- include: macosx.yml
when: ansible_distribution == 'MacOSX'
- include: ubuntu.yml
when: ansible_distribution == 'Ubuntu'
- name: "Setup mariadb, wkhtmltopdf, nodejs and psutil"
hosts: localhost
become: yes
become_user: root
vars:
mysql_conf_tpl: ../files/mariadb_config.cnf
mysql_secure_installation: True
roles:
- mariadb
- wkhtmltopdf
- nodejs
- psutil
- include: centos.yml
when: ansible_distribution == 'CentOS'
- name: setup bench and dev environment
hosts: localhost
vars:
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
bench_path: "/home/{{ ansible_user_id }}/{{ bench_name }}"
tasks:
# setup frappe-bench
- include: includes/setup_bench.yml
when: not run_travis and not without_bench_setup
- include: debian.yml
when: ansible_distribution == 'Debian'
# setup development environment
- include: includes/setup_dev_env.yml
when: not run_travis and not production
# - include: ubuntu.yml
# when: ansible_distribution == 'Ubuntu'
#
# - include: centos.yml
# when: ansible_distribution == 'CentOS'
#
# - include: debian.yml
# when: ansible_distribution == 'Debian'

View File

@ -1,94 +0,0 @@
---
# Prerequisite for centos
- name: Install yum packages
yum: name={{ item }} state=present
with_items:
- bzip2-devel
- cronie
- dnsmasq
- freetype-devel
- git
- htop
- lcms2-devel
- libjpeg-devel
- libtiff-devel
- libffi-devel
- libwebp-devel
- libXext
- libXrender
- libzip-devel
- libffi-devel
- ntp
- openssl-devel
- postfix
- python-devel
- python-setuptools
- python-pip
- redis
- screen
- sudo
- supervisor
- tcl-devel
- tk-devel
- vim
- which
- xorg-x11-fonts-75dpi
- xorg-x11-fonts-Type1
- zlib-devel
- openssl-devel
- openldap-devel
when: ansible_os_family == 'RedHat'
# Prerequisite for Debian and Ubuntu
- name: Install apt packages
apt: pkg={{ item }} state=present force=yes
with_items:
- build-essential
- software-properties-common
- dnsmasq
- fontconfig
- git
- htop
- libcrypto++-dev
- libfreetype6-dev
- liblcms2-dev
- libssl-dev
- libwebp-dev
- libxext6
- libxrender1
- libxslt1-dev
- libxslt1.1
- libffi-dev
- ntp
- postfix
- python-dev
- python-pip
- python-tk
- redis-server
- screen
- supervisor
- vim
- xfonts-75dpi
- xfonts-base
- zlib1g-dev
- 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 for macos
homebrew: name={{ item }} state=present
with_items:
- cmake
- redis
- mariadb
- nodejs
when: ansible_distribution == 'MacOSX'

View File

@ -0,0 +1,98 @@
---
- name: "Setup prerequisites"
hosts: localhost
become: yes
become_user: root
tasks:
- name: Install yum packages
yum: name={{ item }} state=present
with_items:
- bzip2-devel
- cronie
- dnsmasq
- freetype-devel
- git
- htop
- lcms2-devel
- libjpeg-devel
- libtiff-devel
- libffi-devel
- libwebp-devel
- libXext
- libXrender
- libzip-devel
- libffi-devel
- ntp
- openssl-devel
- postfix
- python-devel
- python-setuptools
- python-pip
- redis
- screen
- sudo
- supervisor
- tcl-devel
- tk-devel
- vim
- which
- xorg-x11-fonts-75dpi
- xorg-x11-fonts-Type1
- zlib-devel
- openssl-devel
- openldap-devel
when: ansible_os_family == 'RedHat'
# Prerequisite for Debian and Ubuntu
- name: Install apt packages
apt: pkg={{ item }} state=present force=yes
with_items:
- build-essential
- software-properties-common
- dnsmasq
- fontconfig
- git
- htop
- libcrypto++-dev
- libfreetype6-dev
- liblcms2-dev
- libssl-dev
- libwebp-dev
- libxext6
- libxrender1
- libxslt1-dev
- libxslt1.1
- libffi-dev
- ntp
- postfix
- python-dev
- python-pip
- python-tk
- redis-server
- screen
- supervisor
- vim
- xfonts-75dpi
- xfonts-base
- zlib1g-dev
- 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 for macos
homebrew: name={{ item }} state=present
with_items:
- cmake
- redis
- mariadb
- nodejs
when: ansible_distribution == 'MacOSX'