Skip to content

Commit

Permalink
Merge pull request #59 from hashicorp/no-proxy-fix
Browse files Browse the repository at this point in the history
add repl_cidr to no_proxy if set
  • Loading branch information
amy-hashi authored Dec 12, 2019
2 parents d5b0b5b + 2412c44 commit ee501a4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/configs/files/install-ptfe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ if [ -s /etc/ptfe/proxy-url ]; then
export http_proxy
export https_proxy
export no_proxy=10.0.0.0/8,127.0.0.1,169.254.169.254
if [[ $(< /etc/ptfe/repl-cidr) != "" ]]; then
repl_cidr=$(cat /etc/ptfe/repl-cidr)
export repl_cidr
export no_proxy=$no_proxy,$repl_cidr
fi
fi

### Decide on distribution specific things
Expand Down
11 changes: 11 additions & 0 deletions modules/configs/templates/cloud-init/cloud-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ write_files:
permissions: "0755"
encoding: b64
content: ${proxy_b64}

%{ if repl_cidr != "" }
- path: /etc/profile.d/proxy.sh
owner: root:root
permissions: "0755"
content: |
export http_proxy="${proxy_url}"
export https_proxy="${proxy_url}"
export no_proxy=10.0.0.0/8,127.0.0.1,169.254.169.254,${repl_cidr}
%{ endif }

%{ endif ~}
%{ if role == "main" }
- path: /etc/replicated.rli
Expand Down

0 comments on commit ee501a4

Please sign in to comment.