mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
[fix] add commands to sudoer
This commit is contained in:
parent
802fa1e239
commit
af16ee3eec
@ -47,7 +47,9 @@ def check_uid():
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def cmd_requires_root():
|
def cmd_requires_root():
|
||||||
if len(sys.argv) > 2 and sys.argv[2] in ('production', 'sudoers', 'lets-encrypt', 'fonts', 'print', 'firewall', 'ssh-port', 'prerequisites', 'role'):
|
if len(sys.argv) > 2 and sys.argv[2] in ('production', 'sudoers', 'lets-encrypt', 'fonts',
|
||||||
|
'print', 'firewall', 'ssh-port', 'prerequisites', 'role', 'mariadb', 'wkhtmltopdf',
|
||||||
|
'nodejs', 'psutil', 'nginx', 'fail2ban'):
|
||||||
return True
|
return True
|
||||||
if len(sys.argv) >= 2 and sys.argv[1] in ('patch', 'renew-lets-encrypt', 'disable-production'):
|
if len(sys.argv) >= 2 and sys.argv[1] in ('patch', 'renew-lets-encrypt', 'disable-production'):
|
||||||
return True
|
return True
|
||||||
|
@ -17,8 +17,10 @@ def install_prerequisites():
|
|||||||
@click.option('--mysql_root_password')
|
@click.option('--mysql_root_password')
|
||||||
def install_maridb(mysql_root_password=''):
|
def install_maridb(mysql_root_password=''):
|
||||||
"Install mariadb 10.1"
|
"Install mariadb 10.1"
|
||||||
extra_vars.update(mysql_root_password)
|
if mysql_root_password:
|
||||||
run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='maridb')
|
extra_vars.update({"mysql_root_password": mysql_root_password})
|
||||||
|
|
||||||
|
run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='mariadb')
|
||||||
|
|
||||||
@click.command('wkhtmltopdf')
|
@click.command('wkhtmltopdf')
|
||||||
def install_wkhtmltopdf():
|
def install_wkhtmltopdf():
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- 80
|
- 80
|
||||||
- 443
|
- 443
|
||||||
- {{ ssh_port }}
|
- "{{ ssh_port }}"
|
||||||
when: ansible_distribution == 'CentOS'
|
when: ansible_distribution == 'CentOS'
|
||||||
|
|
||||||
- name: Restart Firewall
|
- name: Restart Firewall
|
||||||
@ -41,6 +41,6 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- 80
|
- 80
|
||||||
- 443
|
- 443
|
||||||
- {{ ssh_port }}
|
- "{{ ssh_port }}"
|
||||||
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
|
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user