Ansible lint is currently broken for this role. This change updates to
Ansible Core for the dependencies and then adjusts the role files to
ensure that the role can pass lint checks.
Change-Id: Id19209ca0a939bd669b25f9aad7dd5b011e34922
Signed-off-by: Kevin Carter <kecarter@redhat.com>
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
1) Fail if we couldn't figure out what version of Satellite is running.
Otherwise we end up including a playbook that doesn't exist and the
error is misleading.
2) Change the Satellite 6 version check, to use /pulp/api/v2/status
instead of /katello/api/ping; which seems to work better when a
Capsule is used. This URL should work for both Satellite 6 and
Capsule.
3) Document that rhsm_rhsm_port needs to be changed to 8443 if a capsule
is used.
Change-Id: Ibc7c05260f01adf520f5d18f3ea8e23e266e4f6d
So we can configure a specific release when subscribing the node.
It has been reported on https://bugzilla.redhat.com/show_bug.cgi?id=1839063
that setting a release was required to get rpms from
rhel-8-for-x86_64-baseos-eus-rpms repository when installing OpenStack
on RHEL8.
Change-Id: I30d93806a7305e101c25507fb87bd02af62b61a5
- Configure the package manager (yum or dnf) to support the proxy
parameter.
- Pass the proxy parameters when using redhat_subscription module.
- Adding rhsm_rhsm_proxy_proto to not hardcode http in the proxy
url.
rhbz#1816255
Change-Id: I64b2dc97c512cecb7f4e6bcfa283733b3f2c1dc8
1) Simplify the unregister task, which doesn't require any parameter,
easier to maintain and less error prone.
2) Document with a playbook example in README how to unregister.
3) Remove useless register, never used later.
Change-Id: Ic1b6674c4608b555f51aa8c6716630c8d96b7fe2
When using activation key with portal registration method we need
to provide the repositories list to be enabled.
Change-Id: I7aea9173822647a4601167bb2f9e77394d0ed602
If the operator is using an activation key, the repositories that are
associated to the subscription are configured in the Red Hat portal or in the
local instance of Satellite if any.
We can't specify rhsm_repos parameter if you are using rhsm_activation_key.
Otherwise, if you we rhsm_username and rhsm_password, we can use rhsm_repos
to select which parameters are deployed.
This patch:
- adds a debug message in the tasks/main when both options are defined.
- documents this situation in the README.
- adds 2 use cases in the README, one with Satellite and one with
Portal.
Change-Id: I6448d2f7258c2b00b8617f8e12fd06b53d28dc83
* When registration, fails automatically run recovery tasks to ensure a
successful registration
* Add rhsm_repository module to role to allow using the role with Anisble < 2.5
* Add feature to rhsm_repository module to purge repos not listed in the task
* Change how the role handles multiple repositories for much faster
execution time
* Update README with information on new repo behavior and purge option
Change-Id: I8a0b20bf72fb56426b51b94e9936f6174d43c248
- remove rhsm_repository module since it is included with Ansible 2.5
- improve test environment
- convert katello-rhsm-consumer script to Ansible tasks
- gather service and package facts
- use ansible_facts dictionary for facts rather than ansible_[fact]
- set rhsm_server_prefix, rhsm_repo_ca_cert, and rhsm_full_refresh_on_yum
based on portal or satellite registration
Change-Id: Ifdbcc3b23d5f6ea68dcf904e40a7f44c4b61622e
When the activation key is used, we don't want to deploy repositories,
and also it's not compatible with autosubscribe option, they are both
mutually exclusive.
This patch:
- change the default of rhsm_autosubscribe to be undefined.
- configure repositories when activationkey isn't defined.
- use include_tasks since a variable is in the task file name
- add option to force registration
- pass the rhsm_baseurl to the registration task, which is needed when
unregistering
- derive the rhsm_satellite_url from rhsm_baseurl by default, but allow it to
be overridden
- sets validate_certs for yum tasks
- uses dynamic task inclusion rather than static import with a default filter for selecting the registration method
Change-Id: Ibf8c3c573a78acc6815cf3793a208028c43f3ba1
Closes-Bug: #1798382
Support rhsm_pool_ids parameter (it was documented but not used).
This parameter helps to specify the subscription pool IDs to consume.
A pool ID may be specified as a string - just the pool ID
(ex. 0123456789abcdef0123456789abcdef), or as a dict with the pool ID as the
key, and a quantity as the value (ex. 0123456789abcdef0123456789abcdef: 2).
If the quantity is provided, it is used to consume multiple entitlements from
a pool (the pool must support this).
Change-Id: I5658fa97e32193045c9da29126e824a884054e60
- Update README to point to role's new home on Ansible Galaxy
- update rhsm.conf.j2 template so all options are variables
- cleanup rhsm.conf.j2 template by removing comments and compressing lines
- update README with new variables availble in rhsm.conf.j2 template
- increase memory in RHEL6 test machine to prevent kernel panic
- use different repos for RHEL6 and RHEL7 test VMs
Change-Id: Iebd4a992ea1bf9c393f12d2d73c04011f4fe0603
Using default(omit), parameters not part of environment won't be sent to
the module, so fully ignored.
Indeed, username/password/state/autosubscribe are all optional.
Change-Id: I3a81cdaccd2d90a43dec95d21b26d9ea503ed313
The module needs some work in order to operate efficiently. Currently
it always runs and reports a change. Additionally, calling it using a loop
results in multiple runs of the subscription-manager tool, which is quite
slow.