This commit is contained in:
2020-04-16 13:39:23 -06:00
parent 0d76f1eb12
commit fb21a9e8e0
2 changed files with 94 additions and 94 deletions

View File

@@ -1,104 +1,104 @@
--- ---
# # Pip install frappe-bench # Pip install frappe-bench
# - name: Installing pip frappe-bench - name: Installing pip frappe-bench
# pip: pip:
# name: name:
# - frappe-bench - frappe-bench
# # Create {{ base }} directory # Create {{ base }} directory
# - name: Creating {{ base }} directory - name: Creating {{ base }} directory
# file: file:
# path: '{{ base }}' path: '{{ base }}'
# state: directory state: directory
# owner: toor owner: toor
# group: toor group: toor
# mode: '0755' mode: '0755'
# # Run frappe bench init # Run frappe bench init
# - name: Running frappe bench init - name: Running frappe bench init
# # NOTICE: running as toor # NOTICE: running as toor
# become_user: toor become_user: toor
# shell: bench init {{ projectname }} --frappe-branch version-12 --no-backups shell: bench init {{ projectname }} --frappe-branch version-12 --no-backups
# args: args:
# chdir: '{{ base }}' chdir: '{{ base }}'
# # Ensures this command only runs if the dir does NOT exist # Ensures this command only runs if the dir does NOT exist
# creates: '{{ path }}' creates: '{{ path }}'
# when: frappe_repo is undefined when: frappe_repo is undefined
# # Run frappe bench init with custom repo # Run frappe bench init with custom repo
# - name: Running frappe bench init with custom repo - name: Running frappe bench init with custom repo
# # NOTICE: running as toor # NOTICE: running as toor
# become_user: toor become_user: toor
# shell: bench init {{ projectname }} --frappe-path {{ frappe_repo }} --frappe-branch version-12 --no-backups shell: bench init {{ projectname }} --frappe-path {{ frappe_repo }} --frappe-branch version-12 --no-backups
# args: args:
# chdir: '{{ base }}' chdir: '{{ base }}'
# # Ensures this command only runs if the dir does NOT exist # Ensures this command only runs if the dir does NOT exist
# creates: '{{ path }}' creates: '{{ path }}'
# when: frappe_repo is defined when: frappe_repo is defined
# # Create frappe-bench supervisor configs # Create frappe-bench supervisor configs
# - name: Creating frappe-bench supervisor config - name: Creating frappe-bench supervisor config
# become_user: toor become_user: toor
# shell: bench setup supervisor shell: bench setup supervisor
# args: args:
# chdir: '{{ path }}' chdir: '{{ path }}'
# creates: '{{ path }}/config/supervisor.conf' creates: '{{ path }}/config/supervisor.conf'
# # Symlink frappe-bench supervisor config # Symlink frappe-bench supervisor config
# - name: Symlinking frappe-bench supervisor config - name: Symlinking frappe-bench supervisor config
# file: file:
# src: '{{ path }}/config/supervisor.conf' src: '{{ path }}/config/supervisor.conf'
# dest: /etc/supervisor/conf.d/frappe-bench.conf dest: /etc/supervisor/conf.d/frappe-bench.conf
# state: link state: link
# notify: reload supervisor notify: reload supervisor
# # Get ERPNext app # Get ERPNext app
# - name: Getting ERPNext app - name: Getting ERPNext app
# become_user: toor become_user: toor
# shell: bench get-app erpnext --branch version-12 shell: bench get-app erpnext --branch version-12
# args: args:
# chdir: '{{ path }}' chdir: '{{ path }}'
# creates: '{{ path }}/apps/erpnext' creates: '{{ path }}/apps/erpnext'
# notify: reload supervisor notify: reload supervisor
# when: erpnext_repo is undefined when: erpnext_repo is undefined
# # Get ERPNext app from custom repo # Get ERPNext app from custom repo
# - name: Getting ERPNext app from custom repo - name: Getting ERPNext app from custom repo
# become_user: toor become_user: toor
# shell: bench get-app erpnext {{ erpnext_repo }} --branch version-12 shell: bench get-app erpnext {{ erpnext_repo }} --branch version-12
# args: args:
# chdir: '{{ path }}' chdir: '{{ path }}'
# creates: '{{ path }}/apps/erpnext' creates: '{{ path }}/apps/erpnext'
# notify: reload supervisor notify: reload supervisor
# when: erpnext_repo is defined when: erpnext_repo is defined
# # Settings frappe bench mariadb-host # Settings frappe bench mariadb-host
# - name: Setting frappe bench mariadb-host - name: Setting frappe bench mariadb-host
# become_user: toor become_user: toor
# shell: bench set-mariadb-host {{ db_host }} shell: bench set-mariadb-host {{ db_host }}
# args: args:
# chdir: '{{ path }}' chdir: '{{ path }}'
# when: db_host is defined when: db_host is defined
# # Create new site using local database # Create new site using local database
# - name: Creating new frappe site using local database - name: Creating new frappe site using local database
# become_user: toor become_user: toor
# shell: bench new-site {{ site }} --admin-password {{ erpnext_admin_password }} --db-name {{ db_name }} --db-password {{ erpnext_db_password }} --mariadb-root-username root --mariadb-root-password {{ root_db_password }} --force shell: bench new-site {{ site }} --admin-password {{ erpnext_admin_password }} --db-name {{ db_name }} --db-password {{ erpnext_db_password }} --mariadb-root-username root --mariadb-root-password {{ root_db_password }} --force
# args: args:
# chdir: '{{ path }}' chdir: '{{ path }}'
# creates: '{{ path }}/sites/{{ site }}' creates: '{{ path }}/sites/{{ site }}'
# notify: reload supervisor notify: reload supervisor
# when: db_host is undefined when: db_host is undefined
# # Create new site using remote database # Create new site using remote database
# - name: Creating new frappe site using remote database - name: Creating new frappe site using remote database
# become_user: toor become_user: toor
# shell: bench new-site {{ site }} --admin-password {{ erpnext_admin_password }} --db-name {{ db_name }} --db-password {{ erpnext_db_password }} --mariadb-root-username root --mariadb-root-password {{ root_db_password }} --force --no-mariadb-socket shell: bench new-site {{ site }} --admin-password {{ erpnext_admin_password }} --db-name {{ db_name }} --db-password {{ erpnext_db_password }} --mariadb-root-username root --mariadb-root-password {{ root_db_password }} --force --no-mariadb-socket
# args: args:
# chdir: '{{ path }}' chdir: '{{ path }}'
# creates: '{{ path }}/sites/{{ site }}' creates: '{{ path }}/sites/{{ site }}'
# notify: reload supervisor notify: reload supervisor
# when: db_host is defined when: db_host is defined
# Adding ERPNext to site # Adding ERPNext to site
- name: Adding ERPNext to site - name: Adding ERPNext to site

View File

@@ -5,8 +5,8 @@
# Because become:yes all command still run as root, until I use # Because become:yes all command still run as root, until I use
# become_user: toor below. # become_user: toor below.
#- include_tasks: configure-linux.yml - include_tasks: configure-linux.yml
#- include_tasks: configure-mysql.yml - include_tasks: configure-mysql.yml
#- include_tasks: configure-python.yml - include_tasks: configure-python.yml
#- include_tasks: configure-nodejs.yml - include_tasks: configure-nodejs.yml
- include_tasks: configure-erpnext.yml - include_tasks: configure-erpnext.yml