From ff21afb2279cde5d82c62881ed2f4419ca42f870 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 22:54:18 +0100 Subject: [PATCH] [PR #5662/471f523f backport][stable-6] redhat_subscription: add `server_proxy_scheme` parameter (#5671) redhat_subscription: add `server_proxy_scheme` parameter (#5662) Add the `server_proxy_scheme` parameter to configure the scheme used for the proxy server. This completes the configuration parameters for the proxy server. (cherry picked from commit 471f523f53220bfbb3e6585b767c7483790c025d) Co-authored-by: Pino Toscano --- .../5662-redhat_subscription-server_proxy_scheme.yaml | 3 +++ plugins/modules/redhat_subscription.py | 6 ++++++ tests/unit/plugins/modules/test_redhat_subscription.py | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 changelogs/fragments/5662-redhat_subscription-server_proxy_scheme.yaml diff --git a/changelogs/fragments/5662-redhat_subscription-server_proxy_scheme.yaml b/changelogs/fragments/5662-redhat_subscription-server_proxy_scheme.yaml new file mode 100644 index 0000000000..293e18311a --- /dev/null +++ b/changelogs/fragments/5662-redhat_subscription-server_proxy_scheme.yaml @@ -0,0 +1,3 @@ +minor_changes: + - redhat_subscription - add a ``server_proxy_scheme`` parameter to configure the scheme for the proxy server + (https://github.com/ansible-collections/community.general/pull/5662). diff --git a/plugins/modules/redhat_subscription.py b/plugins/modules/redhat_subscription.py index 041c1a0097..8836b78564 100644 --- a/plugins/modules/redhat_subscription.py +++ b/plugins/modules/redhat_subscription.py @@ -70,6 +70,11 @@ options: description: - Specify an HTTP proxy hostname. type: str + server_proxy_scheme: + description: + - Specify an HTTP proxy scheme, for example C(http) or C(https). + type: str + version_added: 6.2.0 server_proxy_port: description: - Specify an HTTP proxy port. @@ -806,6 +811,7 @@ def main(): 'consumer_id': {}, 'force_register': {'default': False, 'type': 'bool'}, 'server_proxy_hostname': {}, + 'server_proxy_scheme': {}, 'server_proxy_port': {}, 'server_proxy_user': {}, 'server_proxy_password': {'no_log': True}, diff --git a/tests/unit/plugins/modules/test_redhat_subscription.py b/tests/unit/plugins/modules/test_redhat_subscription.py index f38f1ffe0d..865f041141 100644 --- a/tests/unit/plugins/modules/test_redhat_subscription.py +++ b/tests/unit/plugins/modules/test_redhat_subscription.py @@ -308,6 +308,7 @@ TEST_CASES = [ 'org_id': 'admin', 'force_register': 'true', 'server_proxy_hostname': 'proxy.company.com', + 'server_proxy_scheme': 'https', 'server_proxy_port': '12345', 'server_proxy_user': 'proxy_user', 'server_proxy_password': 'secret_proxy_password' @@ -327,6 +328,7 @@ TEST_CASES = [ '--server.proxy_hostname=proxy.company.com', '--server.proxy_password=secret_proxy_password', '--server.proxy_port=12345', + '--server.proxy_scheme=https', '--server.proxy_user=proxy_user' ], {'check_rc': True},