2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 00:21:23 +00:00

Refactor code

- bumped up ansible from 2.3.1 to 2.4.1
- renamed include to include_tasks since it has been deprecated in
ansible 2.4
This commit is contained in:
Ameya Shenoy 2018-02-05 01:50:10 +05:30
parent 2cd29aca71
commit c7062e1b38
No known key found for this signature in database
GPG Key ID: 735490161CD5C91E
13 changed files with 32 additions and 32 deletions

View File

@ -17,4 +17,4 @@
# Setup an ERPNext site called site1.local
- include: includes/setup_erpnext.yml
- include_tasks: includes/setup_erpnext.yml

View File

@ -1,13 +1,13 @@
---
- hosts: localhost
- include: ../prerequisites/install_prerequisites.yml
- include_tasks: ../prerequisites/install_prerequisites.yml
when: ansible_distribution != 'MacOSX'
- include: ../prerequisites/install_roles.yml
- include_tasks: ../prerequisites/install_roles.yml
when: ansible_distribution != 'MacOSX'
- include: macosx.yml
- include_tasks: macosx.yml
when: ansible_distribution == 'MacOSX'
- name: setup bench and dev environment
@ -17,9 +17,9 @@
bench_path: "/home/{{ frappe_user }}/{{ bench_name }}"
tasks:
# setup frappe-bench
- include: includes/setup_bench.yml
- include_tasks: includes/setup_bench.yml
when: not run_travis and not without_bench_setup
# setup development environment
- include: includes/setup_dev_env.yml
- include_tasks: includes/setup_dev_env.yml
when: not run_travis and not production and (not without_bench_setup and ansible_distribution == 'Ubuntu')

View File

@ -22,7 +22,7 @@
- wkhtmltopdf
- name: configure mariadb
include: ../prerequisites/roles/mariadb/tasks/main.yml
include_tasks: ../prerequisites/roles/mariadb/tasks/main.yml
vars:
mysql_conf_tpl: ../prerequisites/files/mariadb_config.cnf
@ -30,9 +30,9 @@
pip: name=mysql-python version=1.2.5
# setup frappe-bench
- include: includes/setup_bench.yml
- include_tasks: includes/setup_bench.yml
# setup development environment
- include: includes/setup_dev_env.yml
- include_tasks: includes/setup_dev_env.yml
when: not production

View File

@ -59,7 +59,7 @@ def install_bench(args):
})
success = run_os_command({
'pip': "sudo pip install ansible==2.3.1"
'pip': "sudo pip install ansible==2.4.1"
})
if not success:
@ -93,7 +93,7 @@ def install_bench(args):
repo_path = os.path.join(os.path.expanduser('~'), 'bench')
extra_vars.update(repo_path=repo_path)
run_playbook('develop/create_user.yml', extra_vars=extra_vars)
run_playbook('prerequisites/create_user.yml', extra_vars=extra_vars)
extra_vars.update(get_passwords(args))
if args.production:

View File

@ -1,5 +1,5 @@
---
#- include: setup_essentials.yml
#- include_tasks: setup_essentials.yml
- name: "Setup prerequisites"
hosts: localhost
@ -80,10 +80,10 @@
- libldap2-dev
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- include: ubuntu.yml
- include_tasks: ubuntu.yml
when: ansible_distribution == 'Ubuntu'
- include: debian.yml
- include_tasks: debian.yml
when: ansible_distribution == 'Debian'
# Prerequisite for MACOS

View File

@ -1,8 +1,8 @@
---
- include: centos.yml
- include_tasks: centos.yml
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version|int >= 6
- include: ubuntu.yml
- include_tasks: ubuntu.yml
when: ansible_distribution == 'Ubuntu'
- name: Add configuration
@ -10,7 +10,7 @@
when: mysql_conf_tpl != 'change_me' and ansible_distribution != 'Debian'
notify: restart mysql
- include: debian.yml
- include_tasks: debian.yml
when: ansible_distribution == 'Debian'
- name: Add configuration
@ -24,7 +24,7 @@
- debug:
msg: "{{ mysql_root_password }}"
- include: mysql_secure_installation.yml
- include_tasks: mysql_secure_installation.yml
when: mysql_root_password is defined
- debug: var=mysql_secure_installation

View File

@ -9,10 +9,10 @@
when: nginx_user is not defined
# Setup/install tasks.
- include: setup-RedHat.yml
- include_tasks: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
- include: setup-Debian.yml
- include_tasks: setup-Debian.yml
when: ansible_os_family == 'Debian'
# Replace default nginx config with nginx template
@ -47,4 +47,4 @@
- name: Ensure nginx is started and enabled to start at boot.
service: name=nginx state=started enabled=yes
- include: vhosts.yml
- include_tasks: vhosts.yml

View File

@ -1,2 +1,2 @@
---
- include: ../prerequisites/roles/fail2ban/tasks/configure_nginx_jail.yml
- include_tasks: ../prerequisites/roles/fail2ban/tasks/configure_nginx_jail.yml

View File

@ -1,9 +1,9 @@
---
# Install the common pre-requisites for the setting up bench
- include: ../develop/install.yml
- include_tasks: ../develop/install.yml
- include: includes/setup_inputrc.yml
- include_tasks: includes/setup_inputrc.yml
# Setup Bench for production environment
- include: includes/setup_bench_production.yml
- include_tasks: includes/setup_bench_production.yml
when: not run_travis

View File

@ -1,8 +1,8 @@
---
- include: centos.yml
- include_tasks: centos.yml
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version|int >= 6
- include: ubuntu.yml
- include_tasks: ubuntu.yml
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04'
- name: Add configuration
@ -13,6 +13,6 @@
- name: Start and enable service
service: name=mysql state=started enabled=yes
- include: mysql_secure_installation.yml
- include_tasks: mysql_secure_installation.yml
debug: var=mysql_secure_installation
when: mysql_secure_installation and mysql_root_password is defined

View File

@ -9,10 +9,10 @@
when: nginx_user is not defined
# Setup/install tasks.
- include: setup-RedHat.yml
- include_tasks: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
- include: setup-Debian.yml
- include_tasks: setup-Debian.yml
when: ansible_os_family == 'Debian'
# Nginx setup.
@ -28,4 +28,4 @@
- name: Ensure nginx is started and enabled to start at boot.
service: name=nginx state=started enabled=yes
- include: vhosts.yml
- include_tasks: vhosts.yml

View File

@ -1,5 +1,5 @@
---
- include: base.yml
- include_tasks: base.yml
- name: Clone bench
hosts: all
user: "{{ frappe_user }}"