Merge "Salt minion allow to specify HTTP backend"
diff --git a/.kitchen.yml b/.kitchen.yml
index 4a0edcf..eac1011 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -85,6 +85,7 @@
         minion_handler.sls: tests/pillar/minion_custom_handler.sls
         minion_local_pillar.sls: tests/pillar/minion_local_pillar.sls
         minion_local_reclass.sls: tests/pillar/minion_local_reclass.sls
+        minion_backend_urllib.sls: tests/pillar/minion_backend_urllib.sls
 
   - name: master-default
     provisioner:
diff --git a/README.rst b/README.rst
index 5f528fd..7ec1dfd 100644
--- a/README.rst
+++ b/README.rst
@@ -364,6 +364,17 @@
           host: 127.0.0.1
           port: 3128
 
+Salt minion to specify non-default HTTP backend. The default tornado backend
+does not respect HTTP proxy settings set as environment variables. This is
+useful for cases where you need to set no_proxy lists.
+
+.. code-block:: yaml
+
+    salt:
+      minion:
+        backend: urllib2
+
+
 Salt minion with PKI certificate authority (CA)
 
 .. literalinclude:: tests/pillar/minion_pki_ca.sls
diff --git a/salt/files/minion.conf b/salt/files/minion.conf
index d44a661..cda7554 100644
--- a/salt/files/minion.conf
+++ b/salt/files/minion.conf
@@ -70,6 +70,10 @@
 proxy_port: {{ minion.proxy.port }}
 {%- endif %}
 
+{%- if minion.backend is defined %}
+backend: {{ minion.backend }}
+{%- endif %}
+
 {%- if minion.sentry is defined %}
 sentry_handler:
 {% for server in minion.sentry.servers %}
diff --git a/tests/pillar/minion_backend_urllib.sls b/tests/pillar/minion_backend_urllib.sls
new file mode 100644
index 0000000..6399b34
--- /dev/null
+++ b/tests/pillar/minion_backend_urllib.sls
@@ -0,0 +1,4 @@
+salt:
+  minion:
+    enabled: true
+    backend: urllib2