diff --git a/playbooks/develop/includes/setup_dev_env.yml b/playbooks/develop/includes/setup_dev_env.yml index 31e38de2..50015987 100644 --- a/playbooks/develop/includes/setup_dev_env.yml +++ b/playbooks/develop/includes/setup_dev_env.yml @@ -17,4 +17,4 @@ # Setup an ERPNext site called site1.local - - include: includes/setup_erpnext.yml \ No newline at end of file + - include_tasks: includes/setup_erpnext.yml \ No newline at end of file diff --git a/playbooks/develop/install.yml b/playbooks/develop/install.yml index bc67dbe8..9d7f5083 100644 --- a/playbooks/develop/install.yml +++ b/playbooks/develop/install.yml @@ -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') diff --git a/playbooks/develop/macosx.yml b/playbooks/develop/macosx.yml index 05b8c947..fba1b7ae 100644 --- a/playbooks/develop/macosx.yml +++ b/playbooks/develop/macosx.yml @@ -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 diff --git a/playbooks/install.py b/playbooks/install.py index b65ed1b0..97d7a4ec 100755 --- a/playbooks/install.py +++ b/playbooks/install.py @@ -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: diff --git a/playbooks/develop/create_user.yml b/playbooks/prerequisites/create_user.yml similarity index 100% rename from playbooks/develop/create_user.yml rename to playbooks/prerequisites/create_user.yml diff --git a/playbooks/prerequisites/install_prerequisites.yml b/playbooks/prerequisites/install_prerequisites.yml index 93350a0f..56616dde 100644 --- a/playbooks/prerequisites/install_prerequisites.yml +++ b/playbooks/prerequisites/install_prerequisites.yml @@ -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 diff --git a/playbooks/prerequisites/roles/mariadb/tasks/main.yml b/playbooks/prerequisites/roles/mariadb/tasks/main.yml index bbcc7e77..d8a8b511 100644 --- a/playbooks/prerequisites/roles/mariadb/tasks/main.yml +++ b/playbooks/prerequisites/roles/mariadb/tasks/main.yml @@ -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 diff --git a/playbooks/prerequisites/roles/nginx/tasks/main.yml b/playbooks/prerequisites/roles/nginx/tasks/main.yml index e2e9c279..d7e2b3f6 100644 --- a/playbooks/prerequisites/roles/nginx/tasks/main.yml +++ b/playbooks/prerequisites/roles/nginx/tasks/main.yml @@ -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 diff --git a/playbooks/prerequisites/setup_nginx_proxy_jail.yml b/playbooks/prerequisites/setup_nginx_proxy_jail.yml index 05263f87..40790a10 100644 --- a/playbooks/prerequisites/setup_nginx_proxy_jail.yml +++ b/playbooks/prerequisites/setup_nginx_proxy_jail.yml @@ -1,2 +1,2 @@ --- -- include: ../prerequisites/roles/fail2ban/tasks/configure_nginx_jail.yml \ No newline at end of file +- include_tasks: ../prerequisites/roles/fail2ban/tasks/configure_nginx_jail.yml \ No newline at end of file diff --git a/playbooks/production/install.yml b/playbooks/production/install.yml index 17c5b6ca..d6b865ac 100644 --- a/playbooks/production/install.yml +++ b/playbooks/production/install.yml @@ -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 diff --git a/vm/ansible/roles/mariadb/tasks/main.yml b/vm/ansible/roles/mariadb/tasks/main.yml index 16f09151..225d89c6 100644 --- a/vm/ansible/roles/mariadb/tasks/main.yml +++ b/vm/ansible/roles/mariadb/tasks/main.yml @@ -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 diff --git a/vm/ansible/roles/nginx/tasks/main.yml b/vm/ansible/roles/nginx/tasks/main.yml index da4be94d..f45501a9 100644 --- a/vm/ansible/roles/nginx/tasks/main.yml +++ b/vm/ansible/roles/nginx/tasks/main.yml @@ -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 diff --git a/vm/ansible/vm.yml b/vm/ansible/vm.yml index 18357509..cd3890a1 100644 --- a/vm/ansible/vm.yml +++ b/vm/ansible/vm.yml @@ -1,5 +1,5 @@ --- -- include: base.yml +- include_tasks: base.yml - name: Clone bench hosts: all user: "{{ frappe_user }}"