diff --git a/playbooks/develop/setup_bench.yml b/playbooks/develop/includes/setup_bench.yml similarity index 100% rename from playbooks/develop/setup_bench.yml rename to playbooks/develop/includes/setup_bench.yml diff --git a/playbooks/develop/setup_mariadb.yml b/playbooks/develop/includes/setup_mariadb.yml similarity index 100% rename from playbooks/develop/setup_mariadb.yml rename to playbooks/develop/includes/setup_mariadb.yml diff --git a/playbooks/develop/install.retry b/playbooks/develop/install.retry new file mode 100644 index 00000000..2fbb50c4 --- /dev/null +++ b/playbooks/develop/install.retry @@ -0,0 +1 @@ +localhost diff --git a/playbooks/develop/install.yml b/playbooks/develop/install.yml index e889f20c..a67fe0d7 100644 --- a/playbooks/develop/install.yml +++ b/playbooks/develop/install.yml @@ -1,4 +1,6 @@ --- - hosts: localhost - include: macosx.yml - when: ansible_os_family == 'Darwin' + when: ansible_distribution == 'MacOSX' +- include: ubuntu.yml + when: ansible_distribution == 'Ubuntu' diff --git a/playbooks/develop/macosx.yml b/playbooks/develop/macosx.yml index 2bebd16a..200c7838 100644 --- a/playbooks/develop/macosx.yml +++ b/playbooks/develop/macosx.yml @@ -17,19 +17,17 @@ - mariadb - nodejs - npm - when: ansible_os_family == 'Darwin' # install wkhtmltopdf - name: cask installs homebrew_cask: name={{ item }} state=present with_items: - wkhtmltopdf - when: ansible_os_family == 'Darwin' # setup MariaDB - - include: setup_mariadb.yml + - include: includes/setup_mariadb.yml # setup frappe-bench - - include: setup_bench.yml + - include: includes/setup_bench.yml \ No newline at end of file diff --git a/playbooks/develop/ubuntu.yml b/playbooks/develop/ubuntu.yml new file mode 100644 index 00000000..16834a98 --- /dev/null +++ b/playbooks/develop/ubuntu.yml @@ -0,0 +1,16 @@ +--- +- hosts: localhost + vars: + bench_repo_path: "/usr/local/frappe/bench-repo" + bench_path: "/home/{{ ansible_user_id }}/frappe/frappe-bench" + mysql_config_template: "templates/simple_mariadb_config.cnf" + mysql_conf_dir: /etc/my.cnf.d + + tasks: + + # setup MariaDB + - include: includes/setup_mariadb.yml + + # setup frappe-bench + - include: includes/setup_bench.yml + \ No newline at end of file