miteshget.satellite_installation
Role: Satellite Installer
This role is for installing and setting up a satellite system. It also involves configuring the firewall and its rules.
Requirements
- A satellite repository or subscription should be set up in advance.
- Configure the DNS IP address, with the DNS server having A and PTR records for the host.
Role Variables
satellite_version: "Digit"
- (Required) - The version of the satellite.satellite_admin: "String"
- (Required) - The username for the satellite administrator.satellite_admin_password: "String"
- (Required) - The password for the satellite administrator.satellite_arguments: [List]
- (Default: defaults/main.yml) - Extra arguments for thesatellite-installer
command.initial_satellite_org: "String"
- (Default: defaults/main.yml) - The name of the initial satellite organization.env_type: "String"
- (Required) - The directory within./configs/{{ env_type }}
for storage of setup files.firewall_services: [List]
- (Default: defaults/main.yml) - Services to enable in the firewall.firewall_ports: [List]
- (Default: defaults/main.yml) - Ports to open in the firewall.
Sample Variable Example
satellite_version: 6.7
satellite_admin: <may be admin>
satellite_admin_password: <somethingstrong>
firewall_services:
- ssh
- RH-Satellite-6
firewall_ports:
- 22/tcp
- 80/tcp
- 443/tcp
Pre-Satellite Installation Tasks
If you have specific tasks to do before installing the satellite, create a file in the following location and write your tasks. If not, you can skip this. By default, it's ignored if the file doesn't exist.
./configs/{{ env_type }}/satellite_pre_installation.yml
Post-Satellite Installation Tasks
For tasks to be completed after the satellite installation, create the following file if needed. By default, it's ignored if the file doesn't exist.
./configs/{{ env_type }}/satellite_post_installation.yml
Pre-Satellite Configuration Tasks
If you have tasks to do right before running the satellite-installer
command, create this file. Otherwise, you can skip it. It's ignored if the file isn't there.
./configs/{{ env_type }}/satellite_pre_configuration.yml
Post-Satellite Configuration Tasks
For tasks to be done right after finishing the satellite-installer
command, create this file if needed. It's ignored if the file doesn't exist.
./configs/{{ env_type }}/satellite_post_configuration.yml
Tags
install_satellite
- Tag for all satellite installation tasksconfigure_satellite
- Tag for satellite configuration tasksinstall_firewall
- Tag for firewall-related tasks
Example Commands:
# To run jobs with specific tags
[user@node ~]$ ansible-playbook playbook.yml -e @./sample_vars.yml --tags install_satellite
# To skip jobs with specific tags
[user@node ~]$ ansible-playbook playbook.yml -e @./sample_vars.yml --skip-tags configure_satellite
Example Playbook
Here’s how to use the role in a playbook with variables stored in sample_vars.yml
.
[user@node ~]$ cat sample_vars.yml
satellite_version: 6.7
satellite_admin: 'admin'
satellite_admin_password: 'changeme'
firewall_services:
- ssh
- RH-Satellite-6
firewall_ports:
- 22/tcp
- 80/tcp
- 443/tcp
[user@node ~]$ cat playbook.yml
- hosts: satellite.example.com
roles:
- satellite-install
[user@node ~]$ ansible-playbook playbook.yml -e @./sample_vars.yml
License
GPLv3
Author Information
Mitesh The Mouse mitsharm@redhat.com
Installs and configures satellite version 6.x
ansible-galaxy install miteshget.satellite_installation