From 6d26afa9c7e9d6f42e261c7e63977b46b647e3ab Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 15 Jul 2020 22:52:11 -0400 Subject: [PATCH] Add support for "Simplified Content Access" When Simplified Content Access is enabled for a subscription, the portal can be used with an activation key AND repositories. So this patch adds a new parameter, rhsm_simplified_content_access (False by default for backward compatibility). When set to True, we'll allow the "Configure repository subscriptions" task to be run without any warning since both the rhsm_repos and rhsm_activation_key usually mutually exclusive, now work together when simplified content access is enabled. Change-Id: I4ffa344956572ebcd5a432fe41b86eb682f8d2a3 --- README.md | 1 + defaults/main.yml | 1 + tasks/main.yml | 1 + tasks/portal.yml | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a2b423b..2d8e2aa 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Role Variables | `rhsm_server_hostname` | `subscription.rhn.redhat.com` | FQDN of subscription server. | | `rhsm_server_prefix` | `/subscription` or `/rhsm` | RHS server prefix. `/subscription` when using registering via `portal`, `/rhsm` when registering via `satellite`. | | `rhsm_insecure` | `False` | Disable certificate validation. | +| `rhsm_simplified_content_access` | `False` | Enable Simplified Content Access. | | `rhsm_ssl_verify_depth` | `3` | Depths certificates should be validated when checking. | | `rhsm_rhsm_proxy_proto` | `[undefined]` | protocol used to reach the proxy server (http or https). | | `rhsm_rhsm_proxy_hostname` | `[undefined]` | FQDN of outbound proxy server. | diff --git a/defaults/main.yml b/defaults/main.yml index 784fca7..49a94fa 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -18,6 +18,7 @@ rhsm_rhsm_port: 443 rhsm_server_hostname: subscription.rhn.redhat.com rhsm_server_prefix: "{{ '/rhsm' if rhsm_method == 'satellite' else '/subscription' }}" rhsm_insecure: False +rhsm_simplified_content_access: False rhsm_ssl_verify_depth: 3 # rhsm_rhsm_proxy_proto: "" # rhsm_rhsm_proxy_hostname: "" diff --git a/tasks/main.yml b/tasks/main.yml index 9b13274..d6a7459 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,6 +8,7 @@ debug: msg: "rhsm_repos and rhsm_activation_key are exclusive options when using Satellite" when: + - not rhsm_simplified_content_access - rhsm_repos | length > 0 - rhsm_activation_key is defined - rhsm_method == 'satellite' diff --git a/tasks/portal.yml b/tasks/portal.yml index d1dfa36..e787f65 100644 --- a/tasks/portal.yml +++ b/tasks/portal.yml @@ -41,7 +41,7 @@ when: - rhsm_repos | length > 0 - rhsm_state == 'present' - - rhsm_activation_key is not defined or rhsm_method == 'portal' + - rhsm_activation_key is not defined or rhsm_method == 'portal' or rhsm_simplified_content_access tags: - rhsm - rhsm_repos