diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index eaf56af..2c20e5c 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -152,13 +152,18 @@ def pre_pref(self, apt_packages): # nano if 'nano' in apt_packages: - if WOVar.wo_platform_codename == 'bionic': - Log.debug(self, 'Adding ppa for nano') - WORepo.add(self, ppa=WOVar.wo_ubuntu_backports) + if WOVar.wo_distro == 'ubuntu': + if WOVar.wo_platform_codename == 'bionic': + Log.debug(self, 'Adding ppa for nano') + WORepo.add(self, ppa=WOVar.wo_ubuntu_backports) + elif WOVar.wo_platform_codename == 'xenial': + Log.debug(self, 'Adding ppa for nano') + WORepo.add_key(self, WOVar.wo_nginx_key) + WORepo.add(self, repo_url=WOVar.wo_extra_repo) else: if (not WOFileUtils.grepcheck( self, '/etc/apt/sources.list/wo-repo.list', - 'WordOps') and not WOVar.wo_platform_codename == 'focal'): + 'WordOps')): Log.info(self, "Adding repository for Nano, please wait...") Log.debug(self, 'Adding repository for Nano') WORepo.add_key(self, WOVar.wo_nginx_key) @@ -1260,8 +1265,7 @@ def post_pref(self, apt_packages, packages, upgrade=False): 'added by WordOps') # nanorc - if (('nano' in apt_packages) and - (not WOVar.wo_platform_codename == 'xenial')): + if 'nano' in apt_packages: Log.debug(self, 'Setting up nanorc') WOGit.clone(self, 'https://github.com/scopatz/nanorc.git', '/usr/share/nano-syntax-highlighting') diff --git a/wo/core/variables.py b/wo/core/variables.py index 7b80219..3905beb 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -111,6 +111,10 @@ class WOVar(): # Nginx repo and packages if wo_distro == 'ubuntu': wo_nginx_repo = "ppa:wordops/nginx-wo" + wo_extra_repo = ( + "deb http://download.opensuse.org" + "/repositories/home:/virtubox:" + "/WordOps/xUbuntu_{0}/".format(wo_platform_version)) else: if wo_distro == 'debian': if wo_platform_codename == 'jessie':