Commit Graph

18 Commits

Author SHA1 Message Date
Ghanshyam Mann 340d059ee5 Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: I6b367027aff77f4bf9810903e62ccb59bca0ff38
2024-02-24 11:41:15 -08:00
Kevin Carter da50e0e267
Fix Ansible Lint
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>
2022-04-29 14:12:31 -05:00
Emilien Macchi 6d26afa9c7 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
2020-07-15 22:52:11 -04:00
Emilien Macchi bcda84e1c4 Adjustments to detect Satellite version/mode
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
2020-07-03 15:39:36 +00:00
Emilien Macchi 5f65ba4a3a Introduce rhsm_release parameter
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
2020-05-22 19:02:40 +00:00
Emilien Macchi 7987a09f6e Improve support for HTTP proxy
- 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
2020-03-23 22:01:01 -04:00
Sam Doran b6cc4a511d Add resiliency to subscription management role
* 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
2018-11-06 10:51:30 -05:00
Jose Luis Franco Arza d929bd7804 Correct rhsm_force_registration var name in defaults.
According to the README.md and the variables used
in the tasks, the right name for this variable is
rhsm_force_register.

Change-Id: Ica4dc7f5fb6e56a90d3e7036c3ac8f5f6a231212
2018-10-30 17:57:45 +01:00
Sam Doran f2385c2aa2 Configure Satellite using Ansible instead of a script
- 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
2018-10-22 17:27:21 -04:00
Emilien Macchi a0c7cfffcc Fix defaults when activation key is used, add options
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
2018-10-17 17:29:06 -04:00
Sam Doran 569f43f79d Update README, variables, and rhsm.conf.j2
- 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
2018-02-20 16:52:33 -05:00
Sam Doran 00defe7fc2 Update RHSM role to allow Satellite or Portal registration
- Fix line widths in rhsm_repository.py
- Unify variable names: they all have rhsm_ prefix now

Change-Id: I64e8d7ee201ec9b21ef7c513cf2231994b31c6a6
2018-02-07 16:53:01 -05:00
Sam Doran d4e81a1af9 Lay groundwork for selection input methods
Change-Id: I9adf771ce5fe72efeb3225b6c2329ada479ca4d3
2017-12-28 09:39:58 -08:00
Emilien Macchi a4d2420e60 Support Red Hat Portal Activation Keys
Enable users of the role to not use username/password but activation
key and org_id.

Change-Id: I51941b851c55451377060993f951fcd68cacde0b
2017-12-15 12:48:06 -08:00
Emilien Macchi 4c77ba509d Make redhat_subscription parameters optional
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
2017-12-15 12:28:51 -08:00
Sam Doran 2a3b31915f Configure rhsm.conf 2016-06-16 16:34:49 -04:00
Sam Doran 7851b80722 Correct variable syntax in conditional as well as default parameter 2016-06-15 10:35:02 -04:00
Sam Doran 5fbd676974 Initial commit 2016-06-09 17:31:41 -04:00