2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-24 04:59:01 +00:00
bench/playbooks/site.yml
Ameya Shenoy bebcd5300e
install prereqs before setup production
- removed locked down version of ansible, downloads latest now
- install ansible and other prereqs before bench setup production
2018-04-09 12:34:39 +05:30

49 lines
2.3 KiB
YAML

---
# This is the master playbook that deploys the whole Frappe and ERPNext stack
- hosts: localhost
become: yes
become_user: root
roles:
- { role: common, tags: "common" }
- { role: locale, tags: "locale" }
- { role: swap, tags: "swap", "production" when: production }
- { role: logwatch, tags: "logwatch", "production" when: production }
- { role: bash_screen_wall, tags: "bash_screen_wall", "production" when: production }
- { role: frappe_selinux, tags: "frappe_selinux", "production" when: production }
- { role: dns_caching, tags: "dns_caching", "production" when: production }
- { role: ntpd, tags: "ntpd", "production" when: production }
- { role: mariadb, tags: "mariadb" }
- { role: wkhtmltopdf, tags: "wkhtmltopdf" }
- { role: nodejs, tags: "nodejs" }
- { role: psutil, tags: "psutil" }
- { role: redis, tags: "redis" }
- { role: supervisor, tags: "supervisor", "production" when: production }
- { role: nginx, tags: "nginx", "production" when: production }
- { role: fail2ban, tags: "fail2ban", "production" when: production }
tasks:
- name: Set hostname
hostname: name='{{ hostname }}'
when: hostname is defined and production
- name: Start NTPD
service: name=ntpd state=started
when: ansible_distribution == 'CentOS' and production
- name: Start NTPD
service: name=ntp state=started
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' and production
- include_tasks: macosx.yml
when: ansible_distribution == 'MacOSX'
- name: setup bench and dev environment
hosts: localhost
vars:
bench_repo_path: "/home/{{ frappe_user }}/.bench"
bench_path: "/home/{{ frappe_user }}/{{ bench_name }}"
roles:
# setup frappe-bench
- { role: bench, tags: "bench", when: not run_travis and not without_bench_setup }
...