From 8db9521a9a9170c9ad3d88404157a76d45285fbe Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 27 Aug 2019 22:21:22 +0200 Subject: [PATCH] Fix variables --- wo/cli/plugins/stack.py | 2 -- wo/core/apt_repo.py | 2 +- wo/core/variables.py | 48 +++++++++++++++++++---------------------- 3 files changed, 23 insertions(+), 29 deletions(-) diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index d82a63f..fcf9387 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -63,8 +63,6 @@ class WOStackController(CementBaseController): dict(help='Install PHP 7.3 stack', action='store_true')), (['--mysql'], dict(help='Install MySQL stack', action='store_true')), - (['--mariabackup'], - dict(help='Install MariaBackup stack', action='store_true')), (['--mysqlclient'], dict(help='Install MySQL client for remote MySQL server', action='store_true')), diff --git a/wo/core/apt_repo.py b/wo/core/apt_repo.py index 2ff2862..e5610e7 100644 --- a/wo/core/apt_repo.py +++ b/wo/core/apt_repo.py @@ -47,7 +47,7 @@ class WORepo(): Log.debug(self, "{0}".format(e)) Log.error(self, "Unable to add repo") if ppa is not None: - WOShellExec.cmd_exec(self, "add-apt-repository -y '{ppa_name}'" + WOShellExec.cmd_exec(self, "add-apt-repository -yu '{ppa_name}'" .format(ppa_name=ppa)) def remove(self, ppa=None, repo_url=None): diff --git a/wo/core/variables.py b/wo/core/variables.py index aa4d4f8..4fff892 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -88,28 +88,24 @@ class WOVariables(): # Nginx repo and packages if wo_distro == 'ubuntu': wo_nginx_repo = "ppa:wordops/nginx-wo" - elif wo_distro == 'debian': - if wo_platform_codename == 'jessie': - wo_nginx_repo = ("deb http://download.opensuse.org" - "/repositories/home:" - "/virtubox:/WordOps/Debian_8.0/ /") - elif wo_platform_codename == 'stretch': - wo_nginx_repo = ("deb http://download.opensuse.org" - "/repositories/home:" - "/virtubox:/WordOps/Debian_9.0/ /") - elif wo_platform_codename == 'buster': - wo_nginx_repo = ("deb http://download.opensuse.org" - "/repositories/home:" - "/virtubox:/WordOps/Debian_10/ /") - elif wo_distro == 'raspbian': - if wo_platform_codename == 'stretch': - wo_nginx_repo = ("deb http://download.opensuse.org/" - "repositories/home:" - "/virtubox:/WordOps/Raspbian_9.0/ /") - if wo_platform_codename == 'buster': - wo_nginx_repo = ("deb http://download.opensuse.org/" - "repositories/home:" - "/virtubox:/WordOps/Raspbian_10/ /") + else: + if wo_distro == 'debian': + if wo_platform_codename == 'jessie': + wo_deb_repo = "Debian_8.0" + elif wo_platform_codename == 'stretch': + wo_deb_repo = "Debian_9.0" + elif wo_platform_codename == 'buster': + wo_deb_repo = "Debian_10" + elif wo_distro == 'raspbian': + if wo_platform_codename == 'stretch': + wo_deb_repo = "Raspbian_9.0" + elif wo_platform_codename == 'buster': + wo_deb_repo = "Raspbian_10" + # debian/raspbian nginx repository + wo_nginx_repo = ("deb http://download.opensuse.org" + "/repositories/home:" + "/virtubox:/WordOps/{0}/ /" + .format(wo_deb_repo)) wo_nginx = ["nginx-custom", "nginx-wo"] wo_nginx_key = '188C9FB063F0247A' @@ -117,7 +113,6 @@ class WOVariables(): # PHP repo and packages if wo_distro == 'ubuntu': wo_php_repo = "ppa:ondrej/php" - wo_php_key = '' else: wo_php_repo = ( "deb https://packages.sury.org/php/ {codename} main" @@ -143,15 +138,16 @@ class WOVariables(): "http://sfo1.mirrors.digitalocean.com/mariadb/repo/" "10.3/ubuntu {codename} main" .format(codename=wo_platform_codename)) - if wo_distro == 'raspbian': - wo_mysql = ["mariadb-server", "percona-toolkit", - "python3-mysqldb"] else: wo_mysql_repo = ("deb [arch=amd64,ppc64el] " "http://sfo1.mirrors.digitalocean.com/mariadb/repo/" "10.3/debian {codename} main" .format(codename=wo_platform_codename)) + if wo_distro == 'raspbian': + wo_mysql = ["mariadb-server", "percona-toolkit", + "python3-mysqldb"] + else: wo_mysql = ["mariadb-server", "percona-toolkit", "python3-mysqldb", "mariadb-backup"]