mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00

Check if the specified APT proxy server can be reached, informing the user if this can't be done. That will help them to debug the errors that will be raised by `apt-get` because of the misleading proxy configuration. This closes #95.
12 lines
410 B
Python
12 lines
410 B
Python
def validate_manifest(data, validator, error):
|
|
import os.path
|
|
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json'))
|
|
validator(data, schema_path)
|
|
|
|
|
|
def resolve_tasks(taskset, manifest):
|
|
import tasks
|
|
taskset.add(tasks.CheckAptProxy)
|
|
taskset.add(tasks.SetAptProxy)
|
|
if not manifest.plugins['apt_proxy'].get('persistent', False):
|
|
taskset.add(tasks.RemoveAptProxy)
|