2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00
bench/playbooks/site.yml

49 lines
2.3 KiB
YAML
Raw Normal View History

2018-02-05 09:37:14 +00:00
---
# 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 }
2018-02-05 09:37:14 +00:00
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 }
...