Closed cmonty14 closed 4 years ago
Did you add the dictionary to the CLI_DEFAULTS
dictionary just below?
CLI_DEFAULTS = {
"debian": {
'_min_version': '7',
'_max_version': '8',
'7': CLI_DEFAULTS_DEBIAN_BASED_PRE_SYSTEMD_OS,
'8': CLI_DEFAULTS_DEBIAN_BASED_SYSTEMD_OS
},
"ubuntu": {
'_min_version': '14.04',
'_max_version': '16.04',
'14.04': CLI_DEFAULTS_DEBIAN_BASED_PRE_SYSTEMD_OS,
'14.10': CLI_DEFAULTS_DEBIAN_BASED_PRE_SYSTEMD_OS,
'15.04': CLI_DEFAULTS_DEBIAN_BASED_SYSTEMD_OS,
'15.10': CLI_DEFAULTS_DEBIAN_BASED_SYSTEMD_OS,
'16.04': CLI_DEFAULTS_DEBIAN_BASED_SYSTEMD_OS
}
}
See this docker example (simplest way I could think of to quickly spawn an alpine machine):
FROM python:3.6.6-alpine3.7
RUN apk upgrade --no-cache
RUN apk add g++ libffi-dev openssl-dev
RUN pip install certbot
CMD python -c 'from certbot import util;os_info = util.get_os_info();distro = os_info[0].lower();version = os_info[1];print("{} version {}".format(distro, version))'
$ docker build -t test-alpine .
$ docker run test-alpine
alpine version 3.7.0
So I'm guessing you can add
"alpine": {
'_min_version': '3.6',
'_max_version': '3.8',
'3.6': CLI_DEFAULTS_ALPINE_LINUX_OPENRC_OS,
'3.7': CLI_DEFAULTS_ALPINE_LINUX_OPENRC_OS,
'3.8': CLI_DEFAULTS_ALPINE_LINUX_OPENRC_OS
}
to CLI_DEFAULT
and you should be good to go, if it works, please submit a PR and I will be glad to merge it.
Hi, I have installed this plugin on Alpine Linux 3.7 with Python 2.7, but I get this error when running certbot:
This OS is obviously not included in the constants.py file, therefore I have added these lines:
However I think this issue is caused by the coding to identify the OS version etc.
How can this issue be fixed?