mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
bebcd5300e
- removed locked down version of ansible, downloads latest now - install ansible and other prereqs before bench setup production
49 lines
2.3 KiB
YAML
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 }
|
|
...
|