-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from wcm-io-devops/feature/add-resolve-support
Add support for curl resolve and SSL offloading scenarios
- Loading branch information
Showing
6 changed files
with
107 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,40 @@ | ||
- name: "Set default (non-ssl) facts" | ||
set_fact: | ||
_response_test_initial_url: "http://{{ response_test_config.httpd.serverName }}{{ _initial_port_suffix }}" | ||
_reponse_test_expected_result_url: "http://{{ response_test_config.httpd.serverName }}{{ _expected_port_suffix }}/" | ||
_response_test_expected_result_url: "http://{{ response_test_config.httpd.serverName }}{{ _expected_port_suffix }}/" | ||
_response_test_headers: [] | ||
|
||
- name: "Set ssl facts" | ||
# When ssl is enforced and we have no ssl offloading we expect an upgrade to https during the response test. | ||
- name: "Set ssl facts." | ||
set_fact: | ||
_reponse_test_expected_result_url: | ||
_response_test_expected_result_url: | ||
"https://{{ response_test_config.httpd.serverNameSsl }}{{ _expected_port_suffix }}/" | ||
when: response_test_config.httpd.ssl.enforce | ||
when: | ||
- response_test_config.httpd.ssl.enforce | ||
- not response_test_config.httpd.ssl.offloading.enabled # when ssl is offloaded we are not expecting an https upgrade | ||
|
||
# When ssl is enforced but offloading is enabled we have to send the "X-Forwarded-Proto" header for the response test | ||
- name: "Set ssl-offloading facts." | ||
set_fact: | ||
_response_test_headers: | ||
- 'X-Forwarded-Proto: https' | ||
when: | ||
- response_test_config.httpd.ssl.enforce | ||
- response_test_config.httpd.ssl.offloading.enabled | ||
|
||
- debug: | ||
msg: | ||
- "_response_test_initial_url : {{ _response_test_initial_url }}" | ||
- "_reponse_test_expected_result_url : {{ _reponse_test_expected_result_url }}" | ||
- "_response_test_expected_result_url : {{ _response_test_expected_result_url }}" | ||
- "response_test_expected_http_code : {{ response_test_expected_http_code }}" | ||
|
||
- name: "Check for {{ aemdst_response_test_expected_http_code }} response when following redirects" | ||
include_tasks: curl.yml | ||
vars: | ||
conga_aemdst_curl_url: "{{ _response_test_initial_url }}" | ||
conga_aemdst_curl_expected_url: "{{ _reponse_test_expected_result_url }}" | ||
conga_aemdst_curl_expected_url: "{{ _response_test_expected_result_url }}" | ||
conga_aemdst_curl_expected_url_test_lazy: "{{ response_test_lazy }}" | ||
conga_aemdst_curl_follow_redirects_expected_http_code: "{{ response_test_expected_http_code }}" | ||
conga_aemdst_curl_follow_redirects: "{{ response_test_follow_redirects }}" | ||
conga_aemdst_curl_headers: "{{ _response_test_headers }}" | ||
|