fdupont_redhat.ims_premigration_rhel
IMS - Pre Migration for RHEL
This role sets up a Red Hat Enterprise Linux virtual machine for migration:
- It adds rules for network interface naming
- It installs the guest agent for oVirt / Red Hat Virtualization
Role Variables
You can change how this role works using some variables. By default, no variable is set, and the role assumes that RPM repositories are already configured on the host.
If the repositories are not set up yet, you can use the following variables to configure them. You can choose from three methods: RHN (Red Hat Satellite 5 / Spacewalk), RHSM (Red Hat Satellite 6 / Katello), or .repo
files for local repositories.
RHN - This method uses two variables:
rhn_config
sets up the system to use Red Hat Satellite 5 / Spacewalk. It is a collection of key-value pairs for therhn_register
module.rhn_channels
specifies the software channels for the host. If you used an activation key withrhn_config
, this may not be needed.
RHSM - This method also uses two variables:
rhsm_config
sets up the system to use Red Hat Satellite 6 / Katello. It is a collection of key-value pairs for theredhat_subscription
module.
Ad-hoc repositories - This method uses one variable:
yum_repositories
is a list of collections, with each collection acting as a wrapper for theyum_repository
module.
Example Playbook
The following playbook will register the virtual machine with a Satellite 6 server and enable the rhel-7-server-rpms
repository. If no extra information is provided, the playbook will assume that the repositories are already set up and will try to install the agent.
---
- hosts: to_be_migrated
vars:
rhsm_config:
server_hostname: "satellite.example.com"
server_username: "admin"
server_password: "secret"
org_id: "my_organization"
rhsm_repositories:
- "rhel-7-server-rpms"
roles:
- role: ims.rhel_pre_migration
ansible-galaxy install fdupont_redhat.ims_premigration_rhel