mirror of
https://github.com/frappe/bench.git
synced 2025-02-04 03:48:24 +00:00
install prereqs before setup production
- removed locked down version of ansible, downloads latest now - install ansible and other prereqs before bench setup production
This commit is contained in:
parent
dd20a9a8e0
commit
bebcd5300e
@ -1,3 +1,4 @@
|
|||||||
|
from bench.utils import exec_cmd
|
||||||
import click, sys, json
|
import click, sys, json
|
||||||
|
|
||||||
@click.group()
|
@click.group()
|
||||||
@ -51,6 +52,9 @@ def setup_fonts():
|
|||||||
def setup_production(user, yes=False):
|
def setup_production(user, yes=False):
|
||||||
"setup bench for production"
|
"setup bench for production"
|
||||||
from bench.config.production_setup import setup_production
|
from bench.config.production_setup import setup_production
|
||||||
|
# Install prereqs for production
|
||||||
|
exec_cmd("sudo pip install ansible")
|
||||||
|
run_playbook('site.yml', tag='production')
|
||||||
setup_production(user=user, yes=yes)
|
setup_production(user=user, yes=yes)
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ def install_bench(args):
|
|||||||
})
|
})
|
||||||
|
|
||||||
success = run_os_command({
|
success = run_os_command({
|
||||||
'pip': "sudo pip install ansible==2.5.0"
|
'pip': "sudo pip install ansible"
|
||||||
})
|
})
|
||||||
|
|
||||||
if not success:
|
if not success:
|
||||||
|
@ -5,22 +5,22 @@
|
|||||||
become: yes
|
become: yes
|
||||||
become_user: root
|
become_user: root
|
||||||
roles:
|
roles:
|
||||||
- { role: common, tags: "common" }
|
- { role: common, tags: "common" }
|
||||||
- { role: locale, tags: "locale" }
|
- { role: locale, tags: "locale" }
|
||||||
- { role: swap, tags: "swap", when: production }
|
- { role: swap, tags: "swap", "production" when: production }
|
||||||
- { role: logwatch, tags: "logwatch", when: production }
|
- { role: logwatch, tags: "logwatch", "production" when: production }
|
||||||
- { role: bash_screen_wall, tags: "bash_screen_wall", when: production }
|
- { role: bash_screen_wall, tags: "bash_screen_wall", "production" when: production }
|
||||||
- { role: frappe_selinux, tags: "frappe_selinux", when: production }
|
- { role: frappe_selinux, tags: "frappe_selinux", "production" when: production }
|
||||||
- { role: dns_caching, tags: "dns_caching", when: production }
|
- { role: dns_caching, tags: "dns_caching", "production" when: production }
|
||||||
- { role: ntpd, tags: "ntpd", when: production }
|
- { role: ntpd, tags: "ntpd", "production" when: production }
|
||||||
- { role: mariadb, tags: "mariadb" }
|
- { role: mariadb, tags: "mariadb" }
|
||||||
- { role: wkhtmltopdf, tags: "wkhtmltopdf" }
|
- { role: wkhtmltopdf, tags: "wkhtmltopdf" }
|
||||||
- { role: nodejs, tags: "nodejs" }
|
- { role: nodejs, tags: "nodejs" }
|
||||||
- { role: psutil, tags: "psutil" }
|
- { role: psutil, tags: "psutil" }
|
||||||
- { role: redis, tags: "redis" }
|
- { role: redis, tags: "redis" }
|
||||||
- { role: supervisor, tags: "supervisor", when: production }
|
- { role: supervisor, tags: "supervisor", "production" when: production }
|
||||||
- { role: nginx, tags: "nginx", when: production }
|
- { role: nginx, tags: "nginx", "production" when: production }
|
||||||
- { role: fail2ban, tags: "fail2ban", when: production }
|
- { role: fail2ban, tags: "fail2ban", "production" when: production }
|
||||||
tasks:
|
tasks:
|
||||||
- name: Set hostname
|
- name: Set hostname
|
||||||
hostname: name='{{ hostname }}'
|
hostname: name='{{ hostname }}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user