improved proxy support

This commit is contained in:
Spencer Smith
2017-10-27 17:14:05 -04:00
parent 4470ee4ccf
commit b27453d8d8
9 changed files with 32 additions and 12 deletions

View File

@@ -28,6 +28,18 @@
backup: yes
register: vault_systemd_placement
- name: Create vault service systemd directory
file:
path: /etc/systemd/system/vault.service.d
state: directory
- name: cluster/systemd | Add vault proxy env vars
template:
src: "http-proxy.conf.j2"
dest: /etc/systemd/system/vault.service.d/http-proxy.conf
backup: yes
when: http_proxy is defined or https_proxy is defined or no_proxy is defined
- name: cluster/systemd | Enable vault.service
systemd:
daemon_reload: true

View File

@@ -0,0 +1,2 @@
[Service]
Environment={% if http_proxy %}"HTTP_PROXY={{ http_proxy }}"{% endif %} {% if https_proxy %}"HTTPS_PROXY={{ https_proxy }}"{% endif %} {% if no_proxy %}"NO_PROXY={{ no_proxy }}"{% endif %}