Beispiel #1
0
def setup_firewall():
	"Setup firewall"
	from bench.utils import run_playbook
	click.confirm('Setting up the firewall will block all ports except 80, 443 and 22\n'
		'Do you want to continue?',
		abort=True)
	run_playbook('production/setup_firewall.yml')
Beispiel #2
0
def set_ssh_port(port):
	"Set SSH Port"
	from bench.utils import run_playbook
	click.confirm('This will change your SSH Port to {}\n'
		'Do you want to continue?'.format(port),
		abort=True)
	run_playbook('production/change_ssh_port.yml', {"ssh_port": port})
Beispiel #3
0
def set_ssh_port(port, force=False):
	"Set SSH Port"
	from bench.utils import run_playbook

	if not force:
		click.confirm('This will change your SSH Port to {}\n'
			'Do you want to continue?'.format(port),
			abort=True)

	run_playbook('roles/bench/tasks/change_ssh_port.yml', {"ssh_port": port})
Beispiel #4
0
def set_ssh_port(port, force=False):
	"Set SSH Port"
	from bench.utils import run_playbook

	if not force:
		click.confirm('This will change your SSH Port to {}\n'
			'Do you want to continue?'.format(port),
			abort=True)

	run_playbook('roles/bench/tasks/change_ssh_port.yml', {"ssh_port": port})
Beispiel #5
0
def install_maridb(mysql_root_password='', version=''):
	if mysql_root_password:
		extra_vars.update({
			"mysql_root_password": mysql_root_password,
		})

	extra_vars.update({
		"mariadb_version": version
	})

	run_playbook('site.yml', extra_vars=extra_vars, tag='mariadb')
Beispiel #6
0
def setup_roles(role, **kwargs):
	"Install dependancies via roles"
	from bench.utils import run_playbook

	extra_vars = {"production": True}
	extra_vars.update(kwargs)

	if role:
		run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag=role)
	else:
		run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars)
Beispiel #7
0
def setup_roles(role, **kwargs):
    "Install dependancies via roles"
    from bench.utils import run_playbook

    extra_vars = {"production": True}
    extra_vars.update(kwargs)

    if role:
        run_playbook('site.yml', extra_vars=extra_vars, tag=role)
    else:
        run_playbook('site.yml', extra_vars=extra_vars)
Beispiel #8
0
def setup_firewall(ssh_port=None, force=False):
    if not force:
        click.confirm(
            "Setting up the firewall will block all ports except 80, 443 and {0}\nDo you want to continue?"
            .format(ssh_port),
            abort=True)

    if not ssh_port:
        ssh_port = 22

    run_playbook("roles/bench/tasks/setup_firewall.yml",
                 {"ssh_port": ssh_port})
Beispiel #9
0
def setup_firewall(ssh_port=None, force=False):
	"Setup firewall"
	from bench.utils import run_playbook

	if not force:
		click.confirm('Setting up the firewall will block all ports except 80, 443 and 22\n'
			'Do you want to continue?',
			abort=True)

	if not ssh_port:
		ssh_port = 22

	run_playbook('production/setup_firewall.yml', {"ssh_port": ssh_port})
Beispiel #10
0
def setup_firewall(ssh_port=None, force=False):
	"Setup firewall"
	from bench.utils import run_playbook

	if not force:
		click.confirm('Setting up the firewall will block all ports except 80, 443 and 22\n'
			'Do you want to continue?',
			abort=True)

	if not ssh_port:
		ssh_port = 22

	run_playbook('roles/bench/tasks/setup_firewall.yml', {"ssh_port": ssh_port})
Beispiel #11
0
def install_nodejs():
    run_playbook('site.yml', extra_vars=extra_vars, tag='nodejs')
Beispiel #12
0
def install_prerequisites():
    run_playbook('site.yml', tag='common, redis')
Beispiel #13
0
def install_maridb(mysql_root_password=''):
	"Install mariadb 10.1"
	if mysql_root_password:
		extra_vars.update({"mysql_root_password": mysql_root_password})

	run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='mariadb')
Beispiel #14
0
def install_psutil():
	run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='psutil')
def install_prerequisites():
    "Install prerequisites"
    run_playbook('prerequisites/install_prerequisites.yml')
Beispiel #16
0
def install_maridb(mysql_root_password=''):
	"Install mariadb 10.1"
	if mysql_root_password:
		extra_vars.update({"mysql_root_password": mysql_root_password})

	run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='mariadb')
Beispiel #17
0
def setup_nginx_proxy_jail(**kwargs):
    run_playbook("roles/fail2ban/tasks/configure_nginx_jail.yml",
                 extra_vars=kwargs)
Beispiel #18
0
def setup_nginx_proxy_jail(**kwargs):
	from bench.utils import run_playbook
	run_playbook('prerequisites/setup_nginx_proxy_jail.yml', extra_vars=kwargs)
Beispiel #19
0
def install_failtoban():
	run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='fail2ban')
Beispiel #20
0
def install_failtoban(**kwargs):
	extra_vars.update(kwargs)
	run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='fail2ban')
Beispiel #21
0
def install_nginx(user=None):
	run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='nginx')
	if user:
		setup_sudoers(user)
Beispiel #22
0
def install_supervisor(user=None):
	run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='supervisor')
	if user:
		setup_sudoers(user)
Beispiel #23
0
def install_supervisor(user=None):
    run_playbook('site.yml', extra_vars=extra_vars, tag='supervisor')
    if user:
        setup_sudoers(user)
Beispiel #24
0
def install_prerequisites():
	run_playbook('site.yml', tag='common, redis')
Beispiel #25
0
def install_virtualbox():
    run_playbook('vm_build.yml', tag='virtualbox')
def install_failtoban(**kwargs):
    extra_vars.update(kwargs)
    run_playbook('prerequisites/install_roles.yml',
                 extra_vars=extra_vars,
                 tag='fail2ban')
Beispiel #27
0
def setup_nginx_proxy_jail(**kwargs):
	from bench.utils import run_playbook
	run_playbook('roles/fail2ban/tasks/configure_nginx_jail.yml', extra_vars=kwargs)
def install_nodejs():
    run_playbook('prerequisites/install_roles.yml',
                 extra_vars=extra_vars,
                 tag='nodejs')
Beispiel #29
0
def install_wkhtmltopdf():
	run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='wkhtmltopdf')
def install_supervisor(user=None):
    run_playbook('prerequisites/install_roles.yml',
                 extra_vars=extra_vars,
                 tag='supervisor')
    if user:
        setup_sudoers(user)
def install_wkhtmltopdf():
    run_playbook('prerequisites/install_roles.yml',
                 extra_vars=extra_vars,
                 tag='wkhtmltopdf')
Beispiel #32
0
def install_nodejs():
	run_playbook('prerequisites/install_roles.yml', extra_vars=extra_vars, tag='nodejs')
def install_psutil():
    run_playbook('prerequisites/install_roles.yml',
                 extra_vars=extra_vars,
                 tag='psutil')
Beispiel #34
0
def install_maridb(mysql_root_password=''):
    if mysql_root_password:
        extra_vars.update({"mysql_root_password": mysql_root_password})

    run_playbook('site.yml', extra_vars=extra_vars, tag='mariadb')
def install_nginx(user=None):
    run_playbook('prerequisites/install_roles.yml',
                 extra_vars=extra_vars,
                 tag='nginx')
    if user:
        setup_sudoers(user)
Beispiel #36
0
def install_prerequisites():
	"Install prerequisites"
	run_playbook('prerequisites/install_prerequisites.yml')
Beispiel #37
0
def setup_nginx_proxy_jail(**kwargs):
    from bench.utils import run_playbook
    run_playbook('prerequisites/setup_nginx_proxy_jail.yml', extra_vars=kwargs)
Beispiel #38
0
def install_wkhtmltopdf():
	run_playbook('site.yml', extra_vars=extra_vars, tag='wkhtmltopdf')
Beispiel #39
0
def setup_nginx_proxy_jail(**kwargs):
    from bench.utils import run_playbook
    run_playbook('roles/fail2ban/tasks/configure_nginx_jail.yml',
                 extra_vars=kwargs)
Beispiel #40
0
def install_nodejs():
	run_playbook('site.yml', extra_vars=extra_vars, tag='nodejs')
Beispiel #41
0
def install_psutil():
	run_playbook('site.yml', extra_vars=extra_vars, tag='psutil')
Beispiel #42
0
def install_supervisor(user=None):
	run_playbook('site.yml', extra_vars=extra_vars, tag='supervisor')
	if user:
		setup_sudoers(user)
Beispiel #43
0
def install_failtoban(**kwargs):
    extra_vars.update(kwargs)
    run_playbook('site.yml', extra_vars=extra_vars, tag='fail2ban')
Beispiel #44
0
def install_nginx(user=None):
	run_playbook('site.yml', extra_vars=extra_vars, tag='nginx')
	if user:
		setup_sudoers(user)
Beispiel #45
0
def install_wkhtmltopdf():
    run_playbook('site.yml', extra_vars=extra_vars, tag='wkhtmltopdf')
Beispiel #46
0
def install_virtualbox():
	run_playbook('vm_build.yml', tag='virtualbox')
Beispiel #47
0
def install_psutil():
    run_playbook('site.yml', extra_vars=extra_vars, tag='psutil')
Beispiel #48
0
def install_packer():
	run_playbook('vm_build.yml', tag='packer')
Beispiel #49
0
def install_nginx(user=None):
    run_playbook('site.yml', extra_vars=extra_vars, tag='nginx')
    if user:
        setup_sudoers(user)
Beispiel #50
0
def install_failtoban(**kwargs):
	extra_vars.update(kwargs)
	run_playbook('site.yml', extra_vars=extra_vars, tag='fail2ban')
Beispiel #51
0
def install_packer():
    run_playbook('vm_build.yml', tag='packer')
Beispiel #52
0
def install_nginx():
    run_playbook('prerequisites/install_roles.yml',
                 extra_vars=extra_vars,
                 tag='nginx')