Skip to content

Latest commit

 

History

116 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Red Hat Satellite Automation

License: GPLv3

Ansible playbooks for Red Hat Satellite automation.

Contents

To create the required Satellite manifest, see Red Hat Subscription Allocations tool and obtaining a manifest file.

Depending on the environment and requirements separate playbooks and/or vars files, group vars, variables defined in an inventory, or some other approach might be appropriate for providing Satellite configuration. These examples aim to provide a known-good starting point for typical installations.

Quick Usage Example

In a typical use case these playbooks and roles would be used to install and configure Satellite and Capsules according to requirements. The example satellite_configure.yml playbook together with the vars_config.yml file could be used as a starting point for defining a complete real-world setup based on local requirements.

Note that the playbooks to install Satellite and Capsules expect basics such as VMs, networking, DNS, timesync, RHEL repositories, and SELinux being configured in advance according to local and Satellite requirements. Use rhel-system-roles and rhel-ansible-roles to apply such basic configurations as needed. Use the example satellite_host_prepare.yml playbook to automate this process.

To use a custom certificate with Satellite please refer to the Satellite installation guide for the needed installer parameters. By default a self-signed certificate will be used.

The capsule_install.yml playbook creates Capsule certificate archives on the Satellite host for each Capsule as /root/{{ inventory_hostname }}-certs.tar. Create these archives with custom certificates manually before running the playbook if needed.

Use satellite-installer --scenario satellite --full-help to see all the available intaller parameters. NB. Newer Satellite versions often change installer options so be prepared to review them when using a different version than these examples were tested against.

To install Red Hat Satellite, upload or refresh manifest, configure Satellite, and install and sync Capsules:

# Edit inventory and settings to suite local environment
vi inventory vault_satellite.yml
vi vars_satellite.yml vars_manifest.yml vars_capsule.yml vars_config.yml

# Configure connected Satellite host repositories
# This requires RHEL system roles to be installed on the current host
# If RHEL system roles not available or in a disconnected environment,
# configure the required repos manually using subscription-manager
ansible-playbook -i inventory satellite_host_repos.yml \
  -e @vault_satellite.yml

# Example to prepare Satellite host for installation,
# make sure to review SSH/user config before applying
vi satellite_host_prepare.yml
ansible-playbook -i inventory -l satellite satellite_host_prepare.yml

# Install Red Hat Satellite
ansible-playbook -i inventory satellite_install.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml

# Upload or refresh manifest
ansible-playbook -i inventory satellite_manifest.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml -e @vars_manifest.yml

# Apply initial Satellite configuration, including products and repos
ansible-playbook -i inventory satellite_configure.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml -e @vars_config.yml \
  -e satellite_full_config=false

# Sync enabled repositories on Satellite
ansible-playbook -i inventory satellite_sync_repos.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml

# Apply full Satellite configuration, including AKs, CVs, and CCVs
ansible-playbook -i inventory satellite_configure.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml -e @vars_config.yml

# Configure Capsule hosts repositories using Satellite
# This requires RHEL system roles to be installed on the current host
# If RHEL system roles not available, configure the required repos manually
ansible-playbook -i inventory capsule_host_repos.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml

# Example to prepare Capsule hosts for installation,
# make sure to review SSH/user config before applying
vi satellite_host_prepare.yml
ansible-playbook -i inventory -l capsules satellite_host_prepare.yml

# Install Satellite Capsules
ansible-playbook -i inventory capsule_install.yml \
  -e @vars_capsule.yml

# Apply full Satellite configuration, including Capsules and HGs
ansible-playbook -i inventory satellite_configure.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml -e @vars_config.yml
  -e satellite_content_view_publish=false

# Sync Capsules from Satellite
ansible-playbook -i inventory satellite_sync_capsules.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml

# Update Satellite and Capsules as needed
ansible-playbook -i inventory satellite_update.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml

# Register and configure managed hosts
ansible-playbook -i inventory -l clients client_host_repos.yml \
  -e @vault_satellite.yml -e @vars_satellite.yml

See Also

See also https://docs.redhat.com/en/documentation/red_hat_satellite/.

See also https://www.redhat.com/en/blog/21-things-every-red-hat-satellite-user-should-know.

See also https://console.redhat.com/ansible/automation-hub/collections/published/redhat/satellite/.

See also https://console.redhat.com/ansible/automation-hub/collections/published/redhat/satellite_operations/.

See also https://console.redhat.com/ansible/automation-hub/collections/published/redhat/rhel_system_roles.

See also https://github.com/myllynen/rhel-ansible-roles.

License

GPLv3+

About

Red Hat Satellite Automation

Resources

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages