Configure Pay-as-you-go Behind Proxy

To identify if a machine is PAYG or not, SUSE Manager needs to use sudo to run instance-flavor-checktool.

If the customer is using a http proxy, they need to make sure this setting is correctly managed by sudo, because by default most environment variables are disregarded.

要实现此目的,一种方法是添加包含以下内容的 /etc/sudoers.d/keep_proxy.conf 文件:

# Preserve any possible proxy configuration
Defaults env_keep += "http_proxy https_proxy no_proxy"

This ensures the proxy related environment variables are preserved during the privileges escalation.