Commit 8d2c3151 authored by Chris Croome's avatar Chris Croome

Working version!

parent 24a22304
......@@ -36,12 +36,12 @@
# Node.js version
nodejs_version: 6
# ERPNext settings
# erpnext branch, from here https://github.com/frappe/erpnext/branches
erpnext_branch: develop
# frappe bench version, use a branch, tag or release from here https://github.com/frappe/bench
erpnext_bench_version: 4.1
# frappe branch, from here https://github.com/frappe/frappe/branches
erpnext_frappe_branch: develop
# optional erpnext branch, from here https://github.com/frappe/erpnext/branches
#erpnext_branch: develop
# optional frappe bench version, use a branch, tag or release from here https://github.com/frappe/bench
#erpnext_bench_version: 4.1
# optional frappe branch, from here https://github.com/frappe/frappe/branches
#erpnext_frappe_branch: develop
erpnext_frappe_user: erpnext
erpnext_frappe_home: "/home/{{ erpnext_frappe_user }}"
# Note that the official installer uses "{{ erpnext_home }}/.bench", for erpnext_bench_repo_path, see
......
......@@ -58,12 +58,22 @@
# https://github.com/frappe/bench#2-install-bench
# https://github.com/frappe/bench/releases
- name: bench repo cloned
- name: "version {{ erpnext_bench_version }} of bench repo cloned"
git:
repo: https://github.com/frappe/bench
dest: "{{ erpnext_bench_repo_path }}"
version: "{{ erpnext_bench_version }}"
update: no
when: erpnext_bench_version is defined and erpnext_bench_version != ""
tags:
- erpnext
- name: bench repo cloned
git:
repo: https://github.com/frappe/bench
dest: "{{ erpnext_bench_repo_path }}"
update: no
when: erpnext_bench_version is not defined or erpnext_bench_version == ""
tags:
- erpnext
......@@ -94,21 +104,7 @@
tags:
- erpnext
- debug:
msg: "Standard out from `pip install --user -e {{ erpnext_bench_repo_path }}`: {{ erpnext_pip_install_bench.stdout_lines }}"
verbosity: 1
when: erpnext_pip_install_bench is defined and erpnext_pip_install_bench.changed
tags:
- erpnext
- debug:
msg: "Standard error from `pip install --user -e {{ erpnext_bench_repo_path }}`: {{ erpnext_pip_install_bench.stderr_lines }}"
verbosity: 1
when: erpnext_pip_install_bench is defined and erpnext_pip_install_bench.changed
tags:
- erpnext
- name: "bench init frappe-bench --frappe-branch {{ erpnext_frappe_branch }}"
- name: "frappe-bench initialised using branch {{ erpnext_frappe_branch }}"
command: "{{ erpnext_frappe_home }}/.local/bin/bench init frappe-bench --frappe-branch {{ erpnext_frappe_branch }}"
args:
chdir: "{{ erpnext_frappe_home }}"
......@@ -116,20 +112,19 @@
become: yes
become_user: "{{ erpnext_frappe_user }}"
register: erpnext_bench_init_frappe_bench
when: erpnext_frappe_branch is defined and erpnext_frappe_branch != ""
tags:
- erpnext
- debug:
msg: "Standard out from `{{ erpnext_frappe_home }}/.local/bin/bench init frappe-bench --frappe-branch {{ erpnext_frappe_branch }}`: {{ erpnext_bench_init_frappe_bench.stdout_lines }}"
verbosity: 1
when: erpnext_bench_init_frappe_bench is defined and erpnext_bench_init_frappe_bench.changed
tags:
- erpnext
- debug:
msg: "Standard error from `{{ erpnext_frappe_home }}/.local/bin/bench init frappe-bench --frappe-branch {{ erpnext_frappe_branch }}`: {{ erpnext_bench_init_frappe_bench.stderr_lines }}"
verbosity: 1
when: erpnext_bench_init_frappe_bench is defined and erpnext_bench_init_frappe_bench.changed
- name: frappe-bench initialised
command: "{{ erpnext_frappe_home }}/.local/bin/bench init frappe-bench"
args:
chdir: "{{ erpnext_frappe_home }}"
creates: "{{ erpnext_frappe_home }}/frappe-bench"
become: yes
become_user: "{{ erpnext_frappe_user }}"
register: erpnext_bench_init_frappe_bench
when: erpnext_frappe_branch is not defined or erpnext_frappe_branch == ""
tags:
- erpnext
......@@ -138,26 +133,26 @@
tags:
- erpnext
- name: Check various MariaDB variables
shell: mysql -e "SHOW VARIABLES;" | grep "{{ item }}" || echo "No match for {{ item }}"
args:
warn: False
register: erpnext_mariadb_check
with_items:
- innodb_file_format
- innodb_file_per_table
- innodb_large_prefix
- character_set_client_handshake
- character_set_server
- collation_server
tags:
- erpnext
- debug:
var: erpnext_mariadb_check
verbosity: 1
tags:
- erpnext
#- name: Check various MariaDB variables
# shell: mysql -e "SHOW VARIABLES;" | grep "{{ item }}" || echo "No match for {{ item }}"
# args:
# warn: False
# register: erpnext_mariadb_check
# with_items:
# - innodb_file_format
# - innodb_file_per_table
# - innodb_large_prefix
# - character_set_client_handshake
# - character_set_server
# - collation_server
# tags:
# - erpnext
#
#- debug:
# var: erpnext_mariadb_check
# verbosity: 1
# tags:
# - erpnext
# It is unclear why this is needed, but if these settings are in 50-server.cnf the install fails
# see https://github.com/frappe/frappe_docker/issues/3
......@@ -232,12 +227,7 @@
tags:
- erpnext
- debug:
msg: "The next shell command to run as the erpnext user: bench get-app --branch {{ erpnext_branch }} erpnext https://github.com/frappe/erpnext"
tags:
- arpnext
- name: Download ERPNext
- name: "Download ERPNext branch {{ erpnext_branch }}"
shell: "{{ erpnext_frappe_home }}/.local/bin/bench get-app --branch {{ erpnext_branch }} erpnext https://github.com/frappe/erpnext"
args:
chdir: "{{ erpnext_bench_path }}"
......@@ -245,11 +235,19 @@
become: yes
become_user: "{{ erpnext_frappe_user }}"
register: erpnext_bench_getapp_erpnext
when: erpnext_branch is defined and erpnext_branch != ""
tags:
- erpnext
- debug:
msg: "The next shell command to run as the erpnext user: {{ erpnext_frappe_home }}/.local/bin/bench --site {{ common_name }} install-app erpnext"
- name: Download ERPNext
shell: "{{ erpnext_frappe_home }}/.local/bin/bench get-app erpnext https://github.com/frappe/erpnext"
args:
chdir: "{{ erpnext_bench_path }}"
creates: "{{ erpnext_bench_path }}/apps/erpnext"
become: yes
become_user: "{{ erpnext_frappe_user }}"
register: erpnext_bench_getapp_erpnext
when: erpnext_branch is not defined or erpnext_branch == ""
tags:
- erpnext
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment