From 1806d31960fdf458fa8b0af1a7e8d88ea2a2b0d5 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 16 Mar 2016 14:41:55 +0530 Subject: [PATCH] [cleanup] playbooks for develop --- playbooks/develop/{ => includes}/setup_bench.yml | 0 .../develop/{ => includes}/setup_mariadb.yml | 0 playbooks/develop/install.retry | 1 + playbooks/develop/install.yml | 4 +++- playbooks/develop/macosx.yml | 6 ++---- playbooks/develop/ubuntu.yml | 16 ++++++++++++++++ 6 files changed, 22 insertions(+), 5 deletions(-) rename playbooks/develop/{ => includes}/setup_bench.yml (100%) rename playbooks/develop/{ => includes}/setup_mariadb.yml (100%) create mode 100644 playbooks/develop/install.retry create mode 100644 playbooks/develop/ubuntu.yml 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