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
This commit is contained in:
Emilien Macchi 2020-07-15 22:52:11 -04:00
parent bcda84e1c4
commit 6d26afa9c7
4 changed files with 4 additions and 1 deletions

View File

@ -34,6 +34,7 @@ Role Variables
| `rhsm_server_hostname` | `subscription.rhn.redhat.com` | FQDN of subscription server. | | `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_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_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_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_proto` | `[undefined]` | protocol used to reach the proxy server (http or https). |
| `rhsm_rhsm_proxy_hostname` | `[undefined]` | FQDN of outbound proxy server. | | `rhsm_rhsm_proxy_hostname` | `[undefined]` | FQDN of outbound proxy server. |

View File

@ -18,6 +18,7 @@ rhsm_rhsm_port: 443
rhsm_server_hostname: subscription.rhn.redhat.com rhsm_server_hostname: subscription.rhn.redhat.com
rhsm_server_prefix: "{{ '/rhsm' if rhsm_method == 'satellite' else '/subscription' }}" rhsm_server_prefix: "{{ '/rhsm' if rhsm_method == 'satellite' else '/subscription' }}"
rhsm_insecure: False rhsm_insecure: False
rhsm_simplified_content_access: False
rhsm_ssl_verify_depth: 3 rhsm_ssl_verify_depth: 3
# rhsm_rhsm_proxy_proto: "" # rhsm_rhsm_proxy_proto: ""
# rhsm_rhsm_proxy_hostname: "" # rhsm_rhsm_proxy_hostname: ""

View File

@ -8,6 +8,7 @@
debug: debug:
msg: "rhsm_repos and rhsm_activation_key are exclusive options when using Satellite" msg: "rhsm_repos and rhsm_activation_key are exclusive options when using Satellite"
when: when:
- not rhsm_simplified_content_access
- rhsm_repos | length > 0 - rhsm_repos | length > 0
- rhsm_activation_key is defined - rhsm_activation_key is defined
- rhsm_method == 'satellite' - rhsm_method == 'satellite'

View File

@ -41,7 +41,7 @@
when: when:
- rhsm_repos | length > 0 - rhsm_repos | length > 0
- rhsm_state == 'present' - 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: tags:
- rhsm - rhsm
- rhsm_repos - rhsm_repos