Ensure we have python3-jinja2

Also remove the conditional installs of python2 packages

Change-Id: I48e08c85d50080bf92d3b14882d9ce664fdb3621
This commit is contained in:
Chris MacNaughton 2019-03-27 16:21:25 +01:00
parent 02b406b6f3
commit fa9633f87a
2 changed files with 4 additions and 19 deletions

View File

@ -2,7 +2,7 @@
# Wrapper to deal with newer Ubuntu versions that don't have py2 installed
# by default.
declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml' 'dnspython')
declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml' 'dnspython' 'jinja2')
check_and_install() {
pkg="${1}-${2}"

View File

@ -75,24 +75,9 @@ from charmhelpers.contrib.hahelpers.cluster import (
)
from charmhelpers.contrib.network import ip as utils
try:
import netifaces
except ImportError:
apt_install('python-netifaces')
import netifaces
try:
from netaddr import IPNetwork
except ImportError:
apt_install('python-netaddr', fatal=True)
from netaddr import IPNetwork
try:
import jinja2
except ImportError:
apt_install('python-jinja2', fatal=True)
import jinja2
import netifaces
from netaddr import IPNetwork
import jinja2
TEMPLATES_DIR = 'templates'