ahuffman.satellite6_bootstrap
ahuffman.satellite6_bootstrap
This Ansible role makes it easy to move clients from Satellite 5 to Satellite 6. It also allows you to register new clients or re-register existing clients to Satellite 6. During this process, it removes all components specific to Satellite 5.
Check the Dependencies
section in this document to ensure you meet all requirements.
Make sure to gather facts before using this Role.
Role Variables
These variables are in the role's defaults/main.yml
file:
Variable Name | Required | Description | Default Value | Variable Type |
---|---|---|---|---|
sat6_server | yes | Fully Qualified Domain Name (FQDN) of the main Satellite6 server. It must not be a Capsule server as we need access to the Satellite6 API. | "" | string |
sat6_capsule | no | If clients need to register to a Capsule server, provide its FQDN here. If left empty, clients will use sat6_server . |
N/A | string |
sat6_user | yes | Username of a Satellite 6 user with permissions to create hosts (usually an admin). | "" | string |
sat6_pass | yes | Password for the sat6_user . |
"" | string |
sat6_organization | yes | Organization label to register the host on Satellite6. | "" | string |
sat6_activation_key | yes | Activation key for registering the host with Satellite6. | "" | string |
sat6_location | no | Name of the location for the host in Satellite6. | "" | string |
sat6_enable_repos | no | List of repositories to enable after registration with Satellite6. | [] | list |
sat6_remote_execution | no | Place a file named [sat6_server]-id_rsa_foreman_proxy.pub in the files directory. This file should be retrieved from the Satellite6 server. The filename prefix should match the sat6_server or sat6_capsule . |
False | boolean |
sat6_remote_execution_user | no | User account for installing the Satellite6 remote execution key. | "root" | string |
sat6_remote_execution_auth_key_path | no | Path to the authorized keys file if it's not in the default location. | "" | string |
sat6_puppet | no | Whether to install and configure Puppet. | False | boolean |
sat6_puppet_environment | no | Puppet environment for the client's puppet agent. | "production" | string |
sat6_force_puppet | no | Whether to uninstall and clean up the client's puppet agent and configuration. | False | boolean |
sat6_update_client | no | Whether to fully update the client being registered. | False | boolean |
sat6_force_katello | no | Whether to uninstall and clean up the client's katello agent. Set to True to re-register a host. |
False | boolean |
sat6_https | no | Whether to use HTTPS for the katello-ca-consumer-latest package installation. | False | boolean |
sat6_legacy_purge | no | Whether to remove the host entry from Satellite 5 during migration. Ignored if /etc/sysconfig/rhn/systemid does not exist. |
False | boolean |
sat6_legacy_user | no | Username of the Satellite 5 user with permissions to remove a host entry. Required if sat6_legacy_purge is True . |
"" | string |
sat6_legacy_pass | no | Password for the Satellite 5 user with access to remove a host entry. Required if sat6_legacy_purge is True . |
"" | string |
sat6_rhsm_port | no | Override the default Satellite 6 subscription-manager port. | "443" | string |
sat6_os_release | no | Specify which operating system release to use. | "" | string |
sat6_host_group | yes | Title of the Host Group to associate with the host. | "" | string |
sat6_update_existing | no | Whether to update an existing Satellite 6 host with specified parameters. | False | boolean |
Additional variables are in the role's vars/main.yml
file and should generally not be changed unless necessary:
Variable Name | Required | Description | Default Value | Variable Type |
---|---|---|---|---|
sat6_rhn_tools | no | List of Satellite5 (RHN) components to remove from a client. | [ "rhn-setup", "rhn-client-tools", "yum-rhn-plugin", "rhnsd", "rhn-check", "rhn-lib", "spacewalk-abrt", "spacewalk-oscap", "osad", "rh--rhui-client", "candlepin-cert-consumer-"] | list |
sat6_puppet_files | no | List of files to remove from the client when sat6_force_puppet is true. |
["/var/lib/puppet", "/opt/puppetlabs/puppet/cache", "/opt/puppetlabs/puppet/ssl"] | list |
sat6_sub_mgr_pkgs | no | List of packages to update post-client registration for proper functionality. | ["yum", "openssl", "python", "subscription-manager", "subscription-manager-migration-*"] | list |
sat6_katello_pkgs | no | List of packages to remove when sat6_force_katello is set. |
["katello-ca-consumer-*", "katello-agent", "gofer", "katello-host-tools", "katello-host-tools-fact-plugin"] | list |
Dependencies
As of version 1.0.3, this Role requires the ahuffman.sat6_create_hosts Role. This is because it adds functionality for specifying a host location and Host Group during migration.
To install the required Role, run ansible-galaxy install ahuffman.sat6_create_hosts
.
If you’re using Ansible Tower/AWX, you can specify this dependency in requirements.yml
to avoid pre-installation.
Example Playbook
---
- hosts: "servers"
vars_files:
- "vars/secrets.yml"
roles:
- role: "ahuffman.satellite6_bootstrap"
sat6_server: "mysat6.foo.bar"
sat6_user: "mysat6user"
sat6_pass: "{{ sat6_user_pass_from_vault }}"
sat6_legacy_purge: True
sat6_legacy_user: "mysat5user"
sat6_legacy_pass: "{{ sat5_legacy_user_pass_from_vault }}"
sat6_activation_key: "mykey1"
sat6_organization: "myorg1"
sat6_update_existing: True
sat6_update_client: True
sat6_enable_repos:
- "rhel-7-server-optional-rpms"
sat6_remote_execution: True
sat6_puppet: True
sat6_host_group: "RHEL7/RHEL7-Virtual-Prod"
sat6_location: "Raleigh"
License
Author
Provides a painless method to migrate clients between Satellite5/Spacewalk and Satellite6/Capsules.
ansible-galaxy install ahuffman.satellite6_bootstrap