Cleaned up role of unused code.
diff --git a/files/external_validator.py b/files/external_validator.py index c3f3d44..dc51d61 100644 --- a/files/external_validator.py +++ b/files/external_validator.py
@@ -1,3 +1,17 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #! /usr/bin/env python # Needs to run the server on the port provided
diff --git a/library/external_validator.py b/library/external_validator.py index c3f3d44..dc51d61 100644 --- a/library/external_validator.py +++ b/library/external_validator.py
@@ -1,3 +1,17 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #! /usr/bin/env python # Needs to run the server on the port provided
diff --git a/tasks/main.yml b/tasks/main.yml index 45b6f9c..8e07e59 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -1,9 +1,12 @@ --- # tasks file for external-port-connectivity-validator-server -- name: Do not use proxy definitions - include: with_no_proxy.yml - when: (https_proxy is not defined or https_proxy | trim == '') and (http_proxy is not defined or http_proxy | trim == '') +- name: Client validator with proxy + debug: + msg: 'Source Server: {{ private_address }}' -- name: Use proxy definitions - include: with_proxy.yml - when: https_proxy is defined and https_proxy | trim != '' and http_proxy is defined and http_proxy | trim != '' +- name: Validate for open port {{ target_server }}:{{ check_port }} with proxy + uri: + url: 'http://{{ target_server }}:{{ check_port }}/check' + environment: + http_proxy: "{{ http_proxy }}" + https_proxy: "{{ https_proxy }}"
diff --git a/tasks/with_no_proxy.yml b/tasks/with_no_proxy.yml deleted file mode 100644 index 46c4a4c..0000000 --- a/tasks/with_no_proxy.yml +++ /dev/null
@@ -1,9 +0,0 @@ ---- -# tasks file for external-port-connectivity-validator-server -- name: Client validator - debug: - msg: 'Client validator: {{ private_address }}' - -- name: Validate for open port {{ target_server }}:{{ check_port }} - uri: - url: 'http://{{ target_server }}:{{ check_port }}/check'
diff --git a/tasks/with_proxy.yml b/tasks/with_proxy.yml deleted file mode 100644 index 8e07e59..0000000 --- a/tasks/with_proxy.yml +++ /dev/null
@@ -1,12 +0,0 @@ ---- -# tasks file for external-port-connectivity-validator-server -- name: Client validator with proxy - debug: - msg: 'Source Server: {{ private_address }}' - -- name: Validate for open port {{ target_server }}:{{ check_port }} with proxy - uri: - url: 'http://{{ target_server }}:{{ check_port }}/check' - environment: - http_proxy: "{{ http_proxy }}" - https_proxy: "{{ https_proxy }}"