Ansible + sync scripts to configure a private RHEL mirror
This enables setting up a private mirror to enable use-cases where reaching out to Red Hat Subscription Management (RHSM) is not possible (e.g. operating system image builds and airgapped deployments) without requiring a full Red Hat Satellite deployment.
You still need to entitle your Red Hat Enterprise Linux systems for deployment, this just lets you turn off the subscription-management DNF plugin since you will not use RHSM for fetching content.
Basic setup for this system requires a RHEL 9 server registered with subscription-manager:
subscription-manager register --org <org> --activationkey <activation-key>
Org ID and activation key can be found in the Red Hat Customer Center.
For development, at least 250GB of disk is recommended. You may also configure a separate volume
as with prod and set
use_external_srv_volume to true in your inventory.
Production use requires a separate volume - At least 1TB is recommended.
use_external_srv_volume is enabled for the prod group by default, and the playbook will
automatically partition, format and mount this to
srv_volume_part_device can be used to configure the device used for
the volume and the created partition - they default to
Ports 80/443 should be open for the repo server, and 8002 for debuginfo. On systems managing their own ingress via firewalld, the playbook will automatically configure those ports. Otherwise, they should be configured using your network/cloud provider's tools as needed.
To use HTTPS, you need to set the
use_https flag and set the paths to certificates to install
nginx_full_bundle_https_certshould be the server public cert concatenated with the CA cert
nginx_private_server_https_keyshould be the private key for the server cert
Copyright 2022 Datto, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.